bug fixed - invalid detection of stalemat