fixes bug when player wins on last move