Fixed bug with slideshow mode