Clean up random function. Fixes Playtime-32