Fixing problem with attachments