fix the test in TestCategorical