fixed the random numbers issue