fixed seeding logic