Fix bug in indexer.
Add index.