fix location validation