fix adding attachments