Fixed winning check for the last move