The main problem is that the terminal for the "dash" is outside the event structure, meanung that it will ge read immediately when the iteration starts. When the event occurs, the stale value is read from the tunnel (It won't magically go back and re-read the terminal again in the same iteration!).
To fix this, the terminal needs to be inside the event structure.
Here's a quick attempt at some cleanup of many of your code monstrosities ;). maybe it can give you some ideas. Modify as needed. 😄