fix issue with attachments