Fix character serialization