Indexer tests + bug fixes