hide categories without elements
fix #661