fix indexing bug in incremental search