fix protobuf code