RNG fixes