Serialization fixes