Minor bugfixes to geofencing