foreign key fix