fix bug in getSumOfAccountBalance