Fixed variable scope issue with seed data