Add nil check for currentSlide