endgame detection changed