ledger and validity check fixes