fix slideshow bug