Fixed random number bug.