fixed double index creation