fixed closing of modal, when pw was changed