     }
 
     func locationManager(manager: CLLocationManager, monitoringDidFailForRegion region: CLRegion?, withError error: NSError) {
-        self.delegate.positionLocationCenter(self, didFailWithError: error)
+        self.delegate?.positionLocationCenter(self, didFailWithError: error)
     }
 }
 


public class Position: NSObject, PositionLocationCenterDelegate {

    private var observers: NSHashTable?
	
    private var locationCenter: PositionLocationCenter!
    private var updatingPosition: Bool
	
	private var activityManager: CMMotionActivityManager
	private var activityQueue: NSOperationQueue
	private var lastActivity: MotionActivityType
	private var updatingActivity: Bool


            
        } else {
            dispatch_async(dispatch_get_main_queue(), {
				guard let handler: OneShotCompletionHandler = completionHandler else { return }
				let error: NSError = NSError(domain: ErrorDomain, code: ErrorType.Restricted.rawValue, userInfo: nil)
				handler(location: nil, error: error)
            })
        }

    }
