Minor bug fix.

Fixed wrong using of randomizer.