Resolve the menu tree sort bug.