Fixed issue with detection of geolocation