Fixing randomness to have uniform distribution