small tweaks in envelope greeting logic