fix bug when deleting debts