trying to fix foreign key issue