Fixed all the bugs for Check and Checkmate