Fixed category code problem with error calls