fixed a bug in the slideshow with having extra items