fix judgement of game over