fix endgame screen logic