fixed infinite loop when getting location from address