fix addAttachment() typo