Fixed minor bug in indexer