Fixed a few small bugs in indexed-search