fixed end of game.