Fixed typo in subcategory traversal