Fix ERR_CERT_COMMON_NAME_INVALID error