improve ProtocolBufSerializer.cs