             return nil
         }
 
-        if let index = self.currentIndex {
+        if let index = currentIndex {
             if index != 0 {
                 return self.viewController(at: index - 1)
-            } else if self.isInfiniteScrollEnabled {
+            } else if isInfiniteScrollEnabled {
                 return self.viewController(at: viewControllerCount - 1)
             }
         }

            return nil
        }
        
        if let index = self.currentIndex {
            if index != viewControllerCount - 1 {
                return self.viewController(at: index + 1)
            } else if self.isInfiniteScrollEnabled {
                return self.viewController(at: 0)
            }
        }

        pageViewController.scrollView?.isScrollEnabled = isScrollEnabled
        pageViewController.scrollView?.isUserInteractionEnabled = isUserInteractionEnabled
        
        reloadData(reloadViewControllers: reloadViewControllers)
    }
    
    private func destroyCurrentPageViewController() {
        pageViewController?.view.removeFromSuperview()
        pageViewController?.removeFromParent()
        pageViewController = nil
    }
    
    /// Re-initialize the internal UIPageViewController instance without reloading data source if it currently exists.
    internal func reconfigurePageViewController() {
        guard pageViewController != nil else {
            return
        }
        setUpPageViewController(reloadViewControllers: false)
    }
    
    /// The options to be passed to a UIPageViewController instance.
    internal var pageViewControllerOptions: [String: Any]? {
        var options = [String: Any]()
        
        if interPageSpacing > 0.0 {
            options[convertFromUIPageViewControllerOptionsKey(UIPageViewController.OptionsKey.interPageSpacing)] = interPageSpacing
        }
        
        guard options.count > 0 else {
