Corrected password generation