Fixed random number generation bug.
Updated generator.