fix cmp on index
Merge pull request #2 from fengjingchao/master

fix cmp on index