fixed protobuf serialization