handle case where index is all the same.
Merge pull request #45 from dcw312/master

handle case where index is all the same.