Fix protobuf assertion