Fix crash when losing the game.