Fixes runtime exception for CategoryLabelGenerator