fixed bugs in carousel