Added tests for envelopes (currently fail)