Fix Internet Explorer error while generating a password