Bug fixes for attribute in category

@aligentjim @jonpday Could one of you please review?  Some minor fixes