Changed the behavior to endgame