fixed a bug in the password validation