Fix random generator.