Fix error thrown by CertificateWrapper