change if statement from empty($group_list ) to $group_list == false