fix Carousel in JavaScript