fixes up the index with truncate