fix total_num_slices