bug fixes in location loading