         }
       },
       set: { [setter] (target, element) in
-        setter(target.object, setTransform(element))
+        setter(target, setTransform(element))
       }
     )
-  }
-}
-
-fileprivate class DynamicSubjectMapBox: Deallocatable {
-
-  let object: AnyObject
-
-  init(_ object: AnyObject) {
-    self.object = object
-  }
-
-  var deallocated: Signal<Void, NoError> {
-    return (object as! Deallocatable).deallocated
   }
 }
 

                               from setTransform: @escaping (U) -> Element) -> DynamicSubject2<U, Error>! {
    guard let target = target else { return nil }

    let box = DynamicSubjectMapBox(target)

    return DynamicSubject2<U, Error>(
      target: box,
      signal: signal,
      context: context,
      get: { [getter] (target) -> Result<U, Error> in
        switch getter(target.object) {
        case .success(let value):
          return .success(getTransform(value))
        case .failure(let error):

    self.context = context
    self.getter = { .success(get($0 as! Target)) }
    self.setter = { set($0 as! Target, $1) }
    self.triggerEventOnSetting = triggerEventOnSetting
  }

  private init(_target: AnyObject,
              signal: Signal<Void, Error>,
              context: ExecutionContext,
              get: @escaping (AnyObject) -> Result<Element, Error>,
              set: @escaping (AnyObject, Element) -> Void,
              triggerEventOnSetting: Bool = true) {
    self.target = _target
    self.signal = signal
    self.context = context
    self.getter = { get($0) }
    self.setter = { set($0, $1) }
    self.triggerEventOnSetting = triggerEventOnSetting
  }

