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

            return
        }
        if case let .double(indexes) = pagingView.currentPageIndex, indexes.count > 0 {
            let index = indexes.sorted().first!
            let value = Float(index + index % 2) / Float(pagingView.numberOfPages - 1)
            slider.setTrueSliderValue(value:value, pagingView: pagingView)
        }
    }
    

            }

            // update slider position
            interfaceBehaviour.snapSliderPosition(slider: pageSlider, pagingView: pagingView)
            
            didRotate = false
        }

