more fixes to indexing