fixed the on-change issue with the slider