Fix bug in sorting terms with hierarchical category
Merge pull request #2 from vohedge/fixOrdering

Fix bug in sorting terms with hierarchical category