add a null check on version number comparison, also added some checks to make sure we don't have a situation where a carousel has no active items