resolve geofence, ionicLoading race condition workaround