fix index creation