Little edit in restore_password logic