Fixing get_attachments