Fix the detection of whether the game is over