[geolocation] Fixes for bugs 1029326 and 1022635