Fixed an off-by-one in a for loop causing exceptions
Merge branch 'hotfix-1.0.1'