rng fix - thanks sergio d lerner