fixed some tests and added stalemate