Fix error when you manually set the index
Merge pull request #4 from bryanreed/master

Fix error when you manually set the index