Fixed a random number glitch