Fix calculation of account balance

Fix issue #46.