slideshow random generator fix