fix foreign key