Fixing bug with attachments getting removed