fixed a bug that pause is invalid when the game is restarted.