fix unlock_wallet bug