Fix bug for CertCode when on off work