Fix bug where clicking escape would run escape code in both game state and main state