Error when displaying categories with checkboxes