Backport fixes from Airmail Confirm