The indices are now properly preserved