fix bug if category has no children