fix off by 1 error
Merge pull request #307 from teharrison/master

fix off by 1 error