fixed indices in delete