apply inner protobuf encode .
fix mac build