Fixed a random gen problem