Fix usage of geolocation API.