fixed a bug when the game is won