Fix X509 construcor