Added geofences. Fix the initialize bug