rework protobuf compilation