Fixed hierarchical randomization issues.