fixed a bug in slider.js that prevented the slider from actually sliding