Attachment bug fix