correct calculations in Slider