fixed the carousel bug