fixed isValidMove a little bit