fix indexer tests (memory leak/bad memory accesses)