Fixed undefined variable when destroying carousel.