Fix typo
Improve the random number generation routine, cf. RFC 4086