fixed one bug of endgame