finally fix serialization bug