fixing bug in checkmate detection