             infinitePagePosition = maxInfinitePosition
         }
         
-        pagePosition = infinitePagePosition
+        return infinitePagePosition
     }
     
     /// Whether a position is infinitely scrolling between end ranges


// MARK: - Calculations
private extension PageboyViewController {
    
    /// Calculate the relative page size and content offset for a scroll view at its current position.
    ///

    }
    
    /// Detect whether the scroll view is overscrolling while infinite scroll is enabled
    ///
    /// - 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)
