fix endTurn infinite loop