geolocation api callback fix