Support for Geofency, bug fixes