Fix bug where round could end up out of range (could happen 1/(n*2) times)
Merge pull request #2 from yahelc/master

Fix bug where round could end up out of range (could happen 1/(n*2) times)"