fix bug in slideshow