Fixed loadSidebarGroups function