attachments bug fix