Fix incorrect drawing positions in envelopes.