Indexing bugs fixed