reorder instructions.  Fix generateSelfSignedCert