removes unneccessary stack construction of protobufs