insertion indexing bugfix