Fix foreign key