Fixing randomness to have uniform distribution
Merge pull request #1 from ankr/random_fix

Fixing randomness to have uniform distribution