Added conditional fix for shorter slideshow