fix foreign key being imported from the wrong variable.