fixed foreign key references