Replaced UInt with Int in RandGenerator (seems to still work consistently cross-targets)