fixed foreign keys