Fixing the slideshow issue on firefox