Slider modulo function fixed