             flowLayout.invalidateLayout()
             if case let .double(indexes) = currentPageIndex,
                 let index = indexes.sorted().first {
-                flowLayout.page = Float(index)
+                flowLayout.currentPageIndex = index
             }
             else if case let .single(index) = currentPageIndex {
-                flowLayout.page = Float(index)
+                flowLayout.currentPageIndex = index
             }
         }
         
         coordinator.animate(alongsideTransition: { [unowned self] (context) in
             self.pagingView.isDoubleSpread = self.isDoubleSpread
             UIView.animate(withDuration: context.transitionDuration) {
+                self.pagingView.resizeVisiblePages()
                 self.updateHudPosition()
             }
         }) { [unowned self] (context) in

        }
    }
    
    @objc func scrollDidEnd() {
        NSObject.cancelPreviousPerformRequests(withTarget: self)
        interfaceBehaviour.updateLabel(label: pageHud.label, pagingView: pagingView, denominator: numberOfPages)

            }
        }
        else {
            let position = value * 2 / Float(pagingView.numberOfPages - 2)
            slider.setTrueSliderValue(value: Float(position), pagingView: pagingView)
        }
    }
