Fixes on the random generator
Merge branch 'Working'