Fix tests and restore non-looping behavior to envelopes