Changed location validation logic.