Fix origin foreign key field not being populated