Merge pull request #490 from lcd047/master

Off by one error