foreign key error fixed (I think)