Fix unit randomization