Repairing the index