RandomUtils fixed and tested