         disposable += outlineView.reactive.delegate.feed(
             property: dataSource,
             to: #selector(NSOutlineViewDelegate.outlineView(_:heightOfRowByItem:)),
-            map: { (dataSource: Element.UnderlyingCollection?, outlineView: NSOutlineView, item: Element.UnderlyingCollection.Value?) -> CGFloat in
+            map: { (dataSource: Element.UnderlyingCollection?, outlineView: NSOutlineView, item: Element.UnderlyingCollection?) -> CGFloat in
                 guard let dataSource = dataSource else { return outlineView.rowHeight }
-                return binder.height(for: item, outlineView: outlineView, dataSource: dataSource) ?? outlineView.rowHeight
+                return binder.height(for: item?.value, outlineView: outlineView, dataSource: dataSource) ?? outlineView.rowHeight
             }
         )
 
         disposable += outlineView.reactive.delegate.feed(
             property: dataSource,
             to: #selector(NSOutlineViewDelegate.outlineView(_:viewFor:item:)),
-            map: { (dataSource: Element.UnderlyingCollection?, outlineView: NSOutlineView, tableColumn: NSTableColumn, item: Element.UnderlyingCollection.Value?) -> NSView? in
+            map: { (dataSource: Element.UnderlyingCollection?, outlineView: NSOutlineView, tableColumn: NSTableColumn, item: Element.UnderlyingCollection?) -> NSView? in
                 guard let dataSource = dataSource else { return nil }
-                return binder.cell(for: item, tableColumn: tableColumn, outlineView: outlineView, dataSource: dataSource)
+                return binder.cell(for: item?.value, tableColumn: tableColumn, outlineView: outlineView, dataSource: dataSource)
             }
         )
 

    }
}


public extension SignalProtocol where Element: ObservableCollectionEventProtocol, Element.UnderlyingCollection: TreeNodeProtocol, Error == NoError {

    @discardableResult
    public func bind(to outlineView: NSOutlineView, animated: Bool = true, createCell: @escaping (Element.UnderlyingCollection, Element.UnderlyingCollection.Value?, NSTableColumn?, NSOutlineView) -> NSView?) -> Disposable {
        let binder = OutlineViewBinder(measureCell: nil, createCell: createCell)

            to: #selector(NSOutlineViewDataSource.outlineView(_:numberOfChildrenOfItem:)),
            map: { (dataSource: Element.UnderlyingCollection?, _: NSOutlineView, item: Element.UnderlyingCollection?) -> Int in
                guard let dataSource = dataSource else { return 0 }
                return item?.children.count ?? dataSource.count
            }
        )

        disposable += outlineView.reactive.dataSource.feed(
            property: dataSource,
            to: #selector(NSOutlineViewDataSource.outlineView(_:child:ofItem:)),
            map: { (dataSource: Element.UnderlyingCollection?, _: NSOutlineView, child: Int, item: Element.UnderlyingCollection?) -> Any in
                guard let item = item else {
                    // If item is nil, then we return the child from the root node
                    return dataSource![IndexPath(index: child)]
                }

                // otherwise return item's child
                return item[IndexPath(index: child)]
            }
        )

        disposable += outlineView.reactive.dataSource.feed(
            property: dataSource,
            to: #selector(NSOutlineViewDataSource.outlineView(_:isItemExpandable:)),
            map: { (dataSource: Element.UnderlyingCollection?, outlineView: NSOutlineView, item: Element.UnderlyingCollection?) -> Bool in
                guard let dataSource = dataSource else { return false }
                return binder.isExpandable(for: item?.value, outlineView: outlineView, dataSource: dataSource)
            }
        )

