fix the slider js bug