fix SQLEnvelope