fixed sorting of subcategories