fixing init index creation