fix a sort issue and expand/collapse facet hierarchy to 3 levels