fix randomness.