Fixed the game occasionally not responding to keypresses.