fix password check bug