Fixed an issue when saving value to balances dict