         
         if let viewController = pageViewController.viewControllers?.first,
             let index = viewControllerMap.index(forObjectAfter: { return $0.object === viewController }) {
-            guard index == self.expectedTransitionIndex else {
+            guard index == expectedTransitionIndex else {
                 return
             }
             
-            self.updateCurrentPageIndexIfNeeded(index)
+            updateCurrentPageIndexIfNeeded(index)
         }
     }
 

    /// - Parameter pagePosition: the current page position.
    /// - Returns: The updated page position (if needed).
    private func adjustedPagePositionForInfiniteOverscroll(from pagePosition: CGFloat) -> CGFloat? {
        guard self.isInfinitelyScrolling(forPosition: pagePosition) else {
            return nil
        }
        
        let maxPagePosition = CGFloat((self.viewControllerCount ?? 1) - 1)
        var integral: Double = 0.0
        var progress = CGFloat(modf(fabs(Double(pagePosition)), &integral))
        var maxInfinitePosition: CGFloat!

    /// - Parameter scrollView: The scroll view.
    /// - Returns: Whether the contentOffset was manipulated to achieve bouncing preference.
    @discardableResult private func updateContentOffsetForBounceIfNeeded(scrollView: UIScrollView) -> Bool {
        guard bounces == false else {
            return false
        }
        
        let previousContentOffset = scrollView.contentOffset
        if currentIndex == 0 && scrollView.contentOffset.x < scrollView.bounds.size.width {
            scrollView.contentOffset = CGPoint(x: scrollView.bounds.size.width, y: 0.0)
        }
        if currentIndex == (viewControllerCount ?? 1) - 1 && scrollView.contentOffset.x > scrollView.bounds.size.width {
            scrollView.contentOffset = CGPoint(x: scrollView.bounds.size.width, y: 0.0)
        }
        return previousContentOffset != scrollView.contentOffset
