Better handling of slices and dimensionalities