HMVC: Fix a bug when there are no categories to be shown
Minor code cleanup