fixing pipelining envelopes bug