Put some debug messages. Output both mapname and left, also put a message inside the if check.
That's how you fix bugs.
Learning how to debug is the most important thing while coding. If you refuse to learn that better stop coding, it's not going to work.
Btw, you need only one map change to figure out what's not working if you do what I said.