fix for getting length of carousel