Fix bug in x509_req