Fix random seeding