Fixed the checkmate/check error
Fixed the checkmate error