Fixed bug in slideshow