fix for off-by-one error.
Merge pull request #3 from ojbyrne/master

fix for off-by-one error.