fixes for endgame
more fixes