fix Charset class serialization