fix way slices are created