Fix script errors for carousel.