fixed the bug that password validation