Fixed bug with check/checkmate