Small fix of randomization.