fixing issue #11: generating random integers correctly
Merge pull request #12 from dymonaz/master

Fixing issue #11: generating random integers correctly