Fix issue where groups will disappear in sidebar if emptied