Fixed a bug in password validation.