added logic to remove carousel when images are not present