Fix Document::retrieveAttachment()