fixes a bug in slides.js