Fix issue with attachments dropped in some cases.