(bsmiles32) Backport - replace Random macro