fix scope of default_type, charset