fixed updateSLider function