improved passphrase handling