Categorical fixups

Some fixups for Categoricals.

Fixes: #3678
let me have a look ; you are jumping they too many hoops here