Updated handling of index creation