Random number Minor errors

Solved some minor errors.