Fix bug where amount could be wrong when transferring debts