Fixed ion and randomization issues.