Bug fix in category and unit model validation