
439 N.W.2d 53 (1989)
BANK OF ELBOW LAKE, Appellant,
v.
The FIRST STATE BANK OF ASHBY, Respondent.
No. C6-88-2188.
Court of Appeals of Minnesota.
May 2, 1989.
Review Denied July 12, 1989.
*54 Robert L. Russell, III, Arvesen, Lundeen, Hoff, Svingen, Athens & Russell, Fergus Falls, for appellant.
Robert C. Swenson, Swenson, Grover, Lervick, Syverson & Battey, Ltd., Alexandria, for respondent.
Heard, considered and decided by FORSBERG, P.J., and PARKER and SHORT, JJ.

OPINION
SHORT, Judge.
The Bank of Elbow Lake appeals the trial court's determination that the First State Bank of Ashby may apply the funds of an account assigned to the Bank of Elbow Lake against a debt owed to the latter bank by its depositor. We reverse the trial court's ruling as to this issue, but affirm the court's decision to deny appellant's requests for costs, attorney fees and leave to amend its complaint.

FACTS
In March of 1986, William L. Scarborough (Scarborough) conducted banking transactions with appellant Bank of Elbow Lake and with respondent The First State Bank of Ashby (Bank of Ashby). On March 21, 1986, Scarborough borrowed $86,000.00 from the Bank of Ashby to be repaid in one year. The debt was secured by a promissory note due March 21, 1987. That note provided: "If this note is not paid on the due date, the Bank shall have the right to setoff the indebtedness evidenced by this note against any indebtedness of this Bank to the undersigned." Scarborough also deposited with the Bank of Ashby the sum of $100,000.00 in a savings account and received a savings certificate, which was to become due three years later on March 21, 1989.
On March 26, 1986, Scarborough borrowed the sum of $100,000.00 from the Bank of Elbow Lake. He signed a promissory note for that amount, which was due on April 9, 1986. Scarborough secured this note by executing to the Bank of Elbow Lake an assignment of the savings certificate he had received from the Bank of Ashby. A Notice of Assignment was hand delivered on that date to the Bank of Ashby, and was immediately acknowledged as follows:
[W]e acknowledge receipt of your notice of assignment and transfer [of the savings certificate] * * * together with all monies and claims for monies now and hereafter due or payable thereon. We further acknowledge that such monies are payable directly to the Bank [of Elbow Lake] and that no account holder or assignee (except for your institution) shall have any right to make any withdrawal from said account or to obtain any new certificate evidencing said account.
Scarborough also delivered the savings certificate to the Bank of Elbow Lake.
Scarborough failed to pay the note held by the Bank of Elbow Lake on April 9, 1986. He also failed to pay the note held by the Bank of Ashby when it matured in March of 1987. On June 24, 1987, the Bank of Ashby attempted to apply Scarborough's savings deposit to the outstanding balance on its note. The Bank of Elbow *55 Lake brought an action in district court to prevent the Bank of Ashby from using the savings deposit as a setoff against the outstanding balance of Scarborough's loan. On cross motions for summary judgment, the trial court ruled that the Bank of Ashby has a right of setoff against the savings account and it granted summary judgment in favor of the Bank of Ashby.

ISSUES
I. May a bank exercise its right of setoff by applying a depositor's funds to the payment of a debt owed it by the depositor when the assignment and acknowledgement occurred prior to the default?
II. Did the trial court properly deny the award of costs and attorney fees?
III. Did the trial court err by ruling that appellant could not amend its complaint to include a claim for punitive damages?

ANALYSIS
In reviewing an order granting summary judgment, this court applies the same standard as the trial court and must determine (a) whether there are any genuine issues of material fact; and (b) whether the trial court erred in its application of law. Betlach v. Wayzata Condominium, 281 N.W.2d 328, 330 (Minn.1979). There are no issues of material fact in dispute in this case. Both parties agree that the issue on appeal involves a question of law. Under these circumstances, this court need not give any special deference to the trial court's conclusion. Frost-Benco Electric Association v. Minnesota Public Utilities Commission, 358 N.W.2d 639, 642 (Minn. 1984); Service Oil, Inc. v. Triplett, 419 N.W.2d 502, 503 (Minn.Ct.App.1988), pet. for rev. denied (Minn. April 20, 1988).

I
Minn.Stat. § 540.03 (1988) provides that:
If a thing in action be assigned, an action thereon by the assignee shall be without prejudice to any setoff or defense existing at the time or before notice of the assignment; * * *
This statute, with a history traceable to Minnesota's territorial laws, reflects the common law principle that an assignee stands in the shoes of the assignor; the assignee does not obtain greater rights than were held by the assignor. State ex rel. Southwell v. Chamberland, 361 N.W. 2d 814, 818 (Minn.1985). The assignee takes subject to claims or defenses "existing at the time or before notice of the assignment." Minn.Stat. § 540.03. The assignor relinquishes all interest in the transferred assets. Thus, any setoff or defense which arises after the assignment may not be asserted against the assignee if notice of the assignment has been given.
The Bank of Ashby argues that its claim for setoff was "existing" before the assignment was made, and the fact that the claim has not matured at the time of the assignment does not affect its right to a setoff. See, e.g., Martin v. Pillsbury, 23 Minn. 175, 177 (1876); St. Louis National Bank v. Gay, 101 Cal. 286, 35 P. 876, 877 (1894); Northwestern National Bank v. Commonwealth, 345 Pa. 192, 27 A.2d 20, 25 (1942). Assuming without deciding that the Bank of Ashby's setoff rights existed at the time of the assignment and notice, we resolve this case on the question of whether the Bank of Ashby relinquished its setoff rights when it gave the acknowledgement to the Bank of Elbow Lake.
In our view the Bank of Ashby gave up any setoff rights that may have existed at the time of assignment and notice by its acknowledgement to the Bank of Elbow Lake. The specific language of the acknowledgement provides that the certificate is "payable directly to the Bank [of Elbow Lake] and that no account holder or assignee (except for your institution) shall have any right to make any withdrawal." The Bank of Elbow Lake specifically put the Bank of Ashby on notice of the assignment, and the Bank of Ashby acknowledged the assignment without reserving its setoff rights. The Bank of Elbow Lake made the loan to Scarborough in reliance on the acknowledgement. Under these circumstances, the Bank of Ashby has no *56 right to set off against the savings certificate monies. Cf. State Bank of Rose Creek v. First Bank of Austin, 320 N.W. 2d 723, 725-26 (Minn.1982) (where a depositor's debt may be set off against the funds in the depositor's bank account as of the time of default where the certificate was assigned after the default). The trial court's decision granting summary judgment to the Bank of Ashby is reversed, and summary judgment is granted to the Bank of Elbow Lake.

II.
The Bank of Elbow Lake argues that it is entitled to recover its costs, disbursements and reasonable attorney fees under Minn.Stat. § 549.21, subd. 2 (1988). Costs and attorney fees may be awarded against a party who acts in bad faith, asserts a frivolous claim or unfounded position or commits a fraud upon the court. Id. The trial court correctly concluded that no fees or costs should be awarded in this case. Scarborough is indebted to both parties to this action. Each party acted reasonably in attempting to secure payment for Scarborough's debt. Further, the Bank of Elbow Lake's claim that the Bank of Ashby acted in bad faith by attempting to apply the deposited funds to the outstanding debt, even if true, would not justify the award of costs and fees. Section 549.21 is applicable only where the bad faith occurs with respect to the litigation itself, not with respect to the underlying cause of action. Anderson v. Medtronic, Inc., 382 N.W.2d 512, 515 (Minn.1986); Gerdin v. Princeton State Bank, 414 N.W.2d 765, 768 (Minn.Ct. App.1987).

III.
The Bank of Elbow Lake also argues it should be allowed to amend its complaint to seek punitive damages against the Bank of Ashby. Punitive damages are allowed in civil actions only upon a clear showing that the defendant acted with willful indifference to the rights or safety of others. Minn.Stat. § 549.20, subd. 1 (1988). Under the circumstances of this case, an attempt by the Bank of Ashby to secure a debt owed to it by a depositor does not justify an award of punitive damages. The trial court's denial of appellant's motion to amend the complaint was not an abuse of discretion. See Warrick v. Giron, 290 N.W.2d 166, 169 (Minn.1980).

DECISION
A bank may not exercise its right of setoff by applying a depositor's funds to the payment of a debt owed it by the depositor when the assignment and acknowledgement occurred prior to the default. That part of the trial court's order and judgment allowing the setoff is reversed. The trial court properly denied appellant's requests for costs, attorney fees and leave to amend the complaint.
Affirmed in part, reversed in part.
