Slider now working correctly