53c53 < push @categorylist, $categoryname if $categoryname; --- > push @categorylist, $categoryname if $categoryname && $catcount > 0;