Fix setDefaultCertificate error on construction