Fix calculation of capital gains. Ledger balances!