Fixed randomize problems