fixed isValidMapLocation bug