Serialization bug fixes.