     }
     
     deinit {
-        scroll.removeObserver(self, forKeyPath: #keyPath(UIScrollView.contentSize), context: &scrollContentSizeContext)
+        scroll.removeObserver(self, forKeyPath: #keyPath(UIScrollView.contentSize), context: &scrollContentContext)
+        scroll.removeObserver(self, forKeyPath: #keyPath(UIScrollView.contentOffset), context: &scrollContentContext)
     }
     
     // MARK: - Properties

        
        scroll.panGestureRecognizer.addTarget(self, action: #selector(SlideOutable.didPanScroll(_:)))
        
        scroll.addObserver(self, forKeyPath: #keyPath(UIScrollView.contentSize), options: .new, context: &scrollContentSizeContext)
        
        defer {
            updateScrollSize()


// MARK: - Scrolling

extension SlideOutable {
    fileprivate func scrollViewDidScroll(_ scrollView: UIScrollView) {
        switch interaction(scrollView: scrollView) {
        case .scroll:
            scrollView.scrollIndicatorInsets.bottom = max(0, scrollView.frame.maxY - bounds.height)
            scrollView.showsVerticalScrollIndicator = true
            lastScrollOffset = scrollView.contentOffset.y
        case .drag:
            if lastScrollOffset > 0 && 0 > scrollView.contentOffset.y {
                // Accounts for missed content offset switching from .scroll to .drag
                lastDragOffset += lastScrollOffset
                
                lastScrollOffset = 0
            }
            scrollView.showsVerticalScrollIndicator = false
            scrollView.contentOffset.y = lastScrollOffset
        }
    }
}

extension UIScrollView {
    func stopDecelerating() {
        setContentOffset(contentOffset, animated: false)
    }
}

extension SlideOutable {
    func didPanScroll(_ pan: UIPanGestureRecognizer) {
        if pan.state == .began {
            header?.gestureRecognizers?.first?.stopCurrentGesture()
        }
        
        switch interaction(pan: pan) {
        case .scroll:
            lastDragOffset = pan.translation(in: pan.view).y
            
            guard pan.state == .ended, case .dragging = state else { break }
            didPanDrag(pan)
            
        case .drag:
            // Forwards interaction
            didPanDrag(pan)
        }
