fixed valid_move