Fixed a bug in the DB function returning the balances of group members