error inserting foreign keys