fixed foreign keys

fixed foreign keys