Fixed random stuff and other things
Merge branch 'random-fix'