Added support for retrieving attachments