Attachment handling modified