Merge pull request #3 from standage/master

Fixed unsigned integer underflow issue.