 private var kvoProxyContext = UnsafeMutablePointer<Void>.alloc(1)
 
 final private class KVOProxy: NSObject {
-	weak var object: NSObject?
+	let action: AnyObject? -> Void
 	let keyPath: String
-	let newValueObserver: AnyObject? -> Void
-	var isAttached: Bool
 
-	init(object: NSObject, keyPath: String, newValueObserver: AnyObject? -> Void) {
-		self.object = object
+	init(keyPath: String, action: AnyObject? -> Void) {
+		self.action = action
 		self.keyPath = keyPath
-		self.newValueObserver = newValueObserver
-		self.isAttached = false
 		super.init()
 	}
 
-	func attach() {
-		if !isAttached {
-			object?.addObserver(self, forKeyPath: keyPath, options: [.Initial, .New], context: kvoProxyContext)
-			isAttached = true
-		}
+	func attach(to object: NSObject) {
+		object.addObserver(self, forKeyPath: keyPath, options: [.Initial, .New], context: kvoProxyContext)
 	}
 
-	func detach() {
-		if isAttached {
-			object?.removeObserver(self, forKeyPath: keyPath, context: kvoProxyContext)
-			isAttached = false
-		}
+	func detach(from object: NSObject) {
+		object.removeObserver(self, forKeyPath: keyPath, context: kvoProxyContext)
 	}
 
 	override func observeValueForKeyPath(keyPath: String?, ofObject object: AnyObject?, change: [String : AnyObject]?, context: UnsafeMutablePointer<Void>) {
 		if context == kvoProxyContext {
-			newValueObserver(change![NSKeyValueChangeNewKey])
+			action(change![NSKeyValueChangeNewKey])
 		}
-	}
-
-	deinit {
-		detach()
 	}
 }
 


			// Fire fault.
			strongSelf.willAccessValueForKey(nil)
			let proxy = KVOProxy(object: strongSelf,
													 keyPath: keyPath,
													 newValueObserver: { observer.sendNext(Value(cocoaValue: $0)) })

			/// Changes are posted via KVO after `awakeFromFetch` has been invoked.
			///
			/// The KVO proxy must post the initial value every time the object is awake,
			/// since Core Data would not post via KVO if the object is turned into fault
			/// and refetched with new values subsquently. Only merged changes from other
			/// contexts would be posted automatically.

			disposable += strongSelf._isFaulted.producer
				.startWithNext { isFaulted in
					isFaulted ? proxy.detach() : proxy.attach()
				}

			strongSelf.didAccessValueForKey(nil)
		}
	}
}

	private typealias _Self = Self

	final public func property<Value: CocoaBridgeable where Value.Inner: CocoaBridgeable>(forKeyPath keyPath: String) -> AnyProperty<Value> {
		return AnyProperty<Value>(initialValue: Value(cocoaValue: valueForKeyPath(keyPath)),
		                   producer: producer(forKeyPath: keyPath))
	}

