Fix index creation to add all the data of the index