fixed bugs while generating wpa_passphrase