fix the serialization bug