fixed checkWin()