fix js-slider behavior