correct layout of protobuf structs