repair the index