diff --git a/pyzotero/zotero.py b/pyzotero/zotero.py
index <HASH>..<HASH> 100644
--- a/pyzotero/zotero.py
+++ b/pyzotero/zotero.py
@@ -396,15 +396,15 @@ class Zotero(object):
         group_title = [t['title'] for t in retrieved.entries]
         group_items = [i['zapi_numitems'] for i in retrieved.entries]
         group_author = [a['author'] for a in retrieved.entries]
-        group_uid = [u['links'][0]['href'] for u in retrieved.entries]
-        for index in range(len(group_id)):
+        group_id = [u['links'][0]['href'] for u in retrieved.entries]
+        for index in range(len(group_uid)):
             group_data = {}
             group_data['uid'] = group_uid[index]
             group_data['title'] = group_title[index]
             group_data['total_items'] = group_items[index]
             group_data['owner'] = group_author[index]
             # Ugh. Fix your fucking API. See also: dedup()
-            group_data['id'] = group_uid[index].split('/')[-1]
+            group_data['id'] = group_id[index].split('/')[-1]
             groups.append(group_data)
             self.url_params = None
         return groups
Stop mixing up id/uid