Stop the game at the right time