[FIX] Fixed ticket 1121, a bug in the index construction.
Merge pull request #83 from singerj/master

[FIX] Fixed ticket 1121, a bug in the index construction.