Improved the behavior of the password generator by differentiating between generating the password and actually applying the generated password to the password field.