fix randomness