fix undefined currentSlide