More bug fixes

numberOfMoves, catching endgame etc