Fixed bug in dumping attachments.