Merge pull request #6 from lnovy/master

Fix off-by-one issue
Merge remote-tracking branch 'upstream/master'