fixed bug with sending attachments