Fix bug when close game.