Fix the bug that the programm crashes when the password is wrong.