Fix bug in ledgerall