Fix import/export for optional fields.