Fix foreignKey