     }
 
     func nestedTransferVelocity(_ velocity: CGFloat) {
-        if velocity >= 0.0 {
+        if velocity > 0.0 {
             return
         }
         self.nestedDeceleration?.isPaused = true
         let startTime = CACurrentMediaTime()
-        var currentOffset = self.outerScrollView.contentOffset
+        let scrollView = outerScrollView
+        var currentOffset = scrollView.contentOffset
         let decelerationRate = outerScrollView.decelerationRate.rawValue
-        self.scrollViewDidEndDragging(self.outerScrollView, willDecelerate: true)
+        scrollViewDidEndDragging(scrollView, willDecelerate: true)
         self.nestedDeceleration = ConstantDisplayLinkAnimator(update: { [weak self] in
             guard let strongSelf = self else {
                 return

            let t = CACurrentMediaTime() - startTime
            var currentVelocity = velocity * 15.0 * CGFloat(pow(Double(decelerationRate), 1000.0 * t))
            currentOffset.y += currentVelocity
            let maxOffset = strongSelf.outerScrollView.contentSize.height - strongSelf.outerScrollView.bounds.height
            if currentOffset.y >= maxOffset {
                currentOffset.y = maxOffset
                currentVelocity = 0.0

                strongSelf.nestedDeceleration = nil
                didEnd = true
            }
            var contentOffset = scrollView.contentOffset
            contentOffset.y = currentOffset.y.flat
            scrollView.setContentOffset(contentOffset, animated: false)
            strongSelf.scrollViewDidScroll(scrollView)
            if didEnd {
                strongSelf.scrollViewDidEndDecelerating(scrollView)
            }
        })
        self.nestedDeceleration?.isPaused = false
