fixed problem with serialization of protobuf message