fixed functionality of the slideshow