fix on the foreign keys