Fixed bug in random.js loop logic