fix broken tests about attachments