Make sure that indexes are set

fixes #2
Merge pull request #3 from mfairchild365/issue-2

Make sure that indexes are set