fixed addAttachment