bugfix: check catid for NULL