Fix for data with fewer slices than expected