fix for wrong foreign key