Improved seeding of random generator.