fixed NPE when retrieving for location