Fix a race condition in pausing.
Fixed an error in the endgame-mode.