
420 N.W.2d 268 (1988)
In re The Matter of the Trust Created Under the Last WILL and Testament OF Robert G. CARGILL, Deceased.
No. C6-87-1676.
Court of Appeals of Minnesota.
March 15, 1988.
*269 Thomas E. Hoffman, James L. Baillie, William J. Brody, Fredrickson & Byron, Minneapolis, for appellant.
Eric B. Schultz, Estes, Parsinen & Levy, Arthur Walsh, Minneapolis, for respondent.
Heard, considered and decided by RANDALL, P.J., and HUSPENI and STONE[*], JJ.

OPINION
RANDALL, Judge.
This appeal is from an order dated July 23, 1987, denying the petition of appellant trustee, First National Bank of Minneapolis, for settlement and allowance of trust accounts with respect to Robert M. Cargill's share of the trust income. Minn. R.Civ.App.P. 103.03(g). Cargill filed a notice of review of the portion of the order denying Cargill's request for reimbursement of reasonable costs and attorney fees. Minn.R.Civ.App.P. 106. We affirm.

FACTS
Robert G. Cargill died testate in 1933. His will created a trust, with the income for the benefit of his wife, Fidelia. After Fidelia's death, the trust income went to his four children: Robert G., Jr., Sylvester, Nannette, and Elizabeth. Robert G., Jr., and Sylvester are deceased. The trust provides for distribution of the trust income of deceased children to their children per stirpes.[1] Robert G., Jr., is survived by three children, including respondent Robert M. Cargill. Respondent was a co-trustee of the trust. By probate court order of June 29, 1983, he was removed as trustee for failure to pay an indebtedness on which he was a personal guarantor for Victoria Grain Co., and for conflict of interest. At that time, First National Bank was appointed sole trustee of the trust.
When First National became the sole trustee, the trust assets included a promissory note, executed by Victoria Grain Co. of Minneapolis on January 1, 1981. The trust's interest in the note was unsecured. The note did have a personal guaranty by *270 respondent. Victoria Grain defaulted on the note, and the trustee reduced Victoria Grain's obligation to judgment. On January 13, 1983, Victoria Grain filed for Chapter 11 reorganization with the U.S. Bankruptcy Court in St. Paul.
Respondent made two payments on the note from his personal account: $2,766.32 on February 24, 1983, and $2,766.32 on March 29, 1983. He made no further payments. On February 29, 1984, an involuntary petition in bankruptcy was filed against respondent. Respondent's bankruptcy schedules listed the trust as a "spendthrift" trust. Respondent therefore claims that he did not list his interest in that trust as an asset of the bankruptcy estate. On the other hand, respondent did list appellant trustee as a creditor. The trustee filed a proof of claim, characterizing respondent's guarantee on the note as an unsecured claim. The trustee did not object to the dischargeability of the debt or to the general bankruptcy discharge, did not challenge respondent's characterization of the trust as "spendthrift," and did not seek relief from the automatic stay.
On September 5, 1984, the bankruptcy court issued a discharge of debtor in respondent's bankruptcy. The discharge included respondent's personal guarantee on the Victoria Grain promissory note in issue on this appeal.
The trustee had begun withholding distributions due respondent under the trust, claiming a right of off set, and continued to withhold distributions after the discharge. By April 1987, the amount withheld totaled approximately $15,000. At that time, the trustee petitioned in probate court for an order confirming and ratifying the withholdings made to that point, and for an order granting it permission to continue to withhold future distributions. Respondent opposed this motion, and moved for an order compelling the trustee to pay him his distributions under the trust and for reimbursement from the trust funds for his reasonable costs and attorney fees incurred as a result of the trustee's withholding.
The trial court affirmed the trustee's prebankruptcy withholding, but held that the post bankruptcy withholdings violated the automatic stay provisions of 11 U.S.C. § 524(a). The trustee was ordered to refund the distributions withheld since the bankruptcy filing date. The court denied Respondent's motions for costs and attorney fees.

ISSUES
1. Did the trial court err by finding the trustee was not entitled to withhold income distributable to respondent after respondent's debt was discharged?
2. Did the trial court abuse its discretion by denying respondent's request for costs and fees?

ANALYSIS

I

Offset
Appellant argues Minnesota common law equitable retainer applies here. The principal case appellant relies on is In re Lindmeyer's Estate, 182 Minn. 607, 235 N.W. 377 (1931). In that case, the children of decedent were given property in decedent's will, share and share alike. Comprising the estate were real estate, $1,230.60, and an "outlawed" promissory note against a son for $185, as well as notes against two other children. In the final decree, the probate court offset the share of each of the three children against their respective shares of the inheritance. The probate court found as a fact that the note had not been paid, but also found that, since it was barred by the statute of limitations, the note could not be offset against the heirs' share of the estate. The issue was whether the debt, barred by the statute of limitations, could be set off against the proceeds of the estate.
Earlier this century, the common law rule was that such an "outlawed" debt could be deducted from the heir's share as a setoff. Id. at 609, 235 N.W. at 377. At that time, courts of other states based their rule on retainer, setoff, equitable lien, or on the theory that "the indebtedness of a distributee of the estate should be regarded *271 as assets of the estate already in his hands, and that his legacy or share is to that extent satisfied." Id. at 609, 235 N.W. at 378. The right discussed in Lindmeyer's Estate, is grounded in equitable principles:
It is said that it would be grossly inequitable to allow such distributee to obtain his full share of an estate while he is withholding that portion of the same that is already in his hands.
Id. The court ruled that, despite the normal prohibition against using legal process to enforce debts after the applicable statute of limitations has run, the heirs were still liable to the estate for their debts on the basis of moral principles.
The concept of common law offset or right of retainer was codified in Minn.Stat. § 525.481, repealed by Laws 1974, ch. 442, art. 8, § 524.8-102 (effective 1976). The statute was repealed in the process of Minnesota's adoption of the Uniform Probate Code. Appellant argues that despite repeal of the statute, the common law should apply because respondent has "unclean hands" and should not be allowed to benefit at the expense of the other trust beneficiaries to whom he owed a duty as trustee. It points out that if respondent does not have to repay the debt under a theory of equitable retainer, setoff or some equitable remedy, he will have received a disproportionate share of the trust proceeds.
Respondent contends that the Uniform Probate Code applies, and the common law principles urged upon us by appellant are inapplicable. Appellant, on the other hand, claims the common law is applicable because it was in force in 1933, when the testator died, whereas the effective date of the Uniform Probate Code was 1976. The wording of the statute itself negates this argument of appellant:
[T]he chapter [UPC] applies to any proceedings in court then pending or thereafter commenced regardless of the time of the death of decedent except to the extent that in the opinion of the court the former procedure should be made applicable in a particular case in the interest of justice or because of infeasibility of application of the procedure of this chapter.
Minn.Stat. § 524.8-101(2) (1986).
Here, the trial court correctly applied the Uniform Probate Code:
The amount of a non-contingent indebtedness of a successor to the estate if due, or its present value if not due, shall be offset against the successor's interest; but the successor has the benefit of any defense which would be available to him in a direct proceeding for recovery of the debt.
Minn.Stat. § 524.3-903 (1986). The language of this provision expressly permits respondent to raise the bankruptcy as a defense to the trustee's claim to future distributions.
The trial court did not, however, base its ruling on applicability of the UPC or Minnesota common law alone, but also construed the bankruptcy discharge.
Appellant argues that the discharge of a debt in bankruptcy prevents any further action for recovery against the debtor personally, but does not extinguish the debt, nor alter the moral obligation to repay. In support of this argument, appellant cites In re Fussell's Estate, 129 Iowa 498, 105 N.W. 503 (1905). In Fussell, the decedent's will provided that her daughter would inherit certain real estate, so long as two promissory notes the estate held against the daughter and another would be paid within one year of decedent's death. The will provided that if the debt was not paid within one year, the executors were empowered to sell the real estate devised to the daughter in order to pay the debt. No payments were made on the notes within the year after the testatrix' death, and the daughter's debts were discharged in bankruptcy within that period of time. Id. at 499, 105 N.W. at 504.
Appellant's reliance on Fussell to support its claim is misplaced. The court there found that although the discharge destroyed the creditor's remedy by enabling the debtor to plead the discharge in bar, the discharge did not operate as an extinguishment *272 of the debt. In holding the estate could carry out the instructions of the will, the court based its decision on the terminology of the will, not, as appellant claims, on a common law right in the nature of offset or lien. The court found that notwithstanding their discharge in bankruptcy, the notes were never paid. It held the testatrix
had the right to impose such conditions as she might choose. She exercised this right, and directed that upon the omission to pay, the property should be sold, and the amount of the notes deducted from the proceeds.
Id. at 500, 105 N.W. at 504.
Since our decision on the applicability of the Uniform Probate Code is dispositive of the matter, we need not address appellant's additional arguments on this issue.

II

Attorney fees
Respondent argues that under In re Atwood's Trust, 227 Minn. 495, 501, 35 N.W.2d 736, 740 (1949), he is entitled to costs and attorney fees because the litigation "is essential to a proper administration of the trust, and * * * is conducted in good faith for the primary benefit of the Trust as a whole." Id. We hold that here, the trial court did not abuse its "sound and cautiously exercised discretion" by refusing to grant respondent's request for fees and costs. See id.

DECISION
The trial court did not err by finding appellant was not entitled to withhold trust distributions to offset respondent's discharged debt. The trial court did not abuse its discretion by refusing to award respondent fees and costs.
Affirmed.
NOTES
[*]  Acting as judge of the Court of Appeals by appointment pursuant to Minn. Const. art. 6, § 2.
[1]  Heirs of a deceased distributee split that respective share.
