fix foreign key reference