fix multi-slices encoding