Fixed randomization issues.