Fixes BoundsError issue.
Merge pull request #35 from blakejohnson/boundserror-fix

Fixes BoundsError issue.