Ledger and ZC unit test + fix