
127 P.3d 1224 (2005)
2005 UT App 518
Tracy COWLEY, Plaintiff, Appellee, and Cross-appellant,
v.
Slone PORTER, Defendant, Appellant, and Cross-appellee.
No. 20040827-CA.
Court of Appeals of Utah.
December 8, 2005.
*1226 Darrel J. Bostwick, Jeffery R. Price, and Christopher C. Hill, Bostwick & Pricem Salt Lake City, for Appellant and Cross-appellee.
E. Craig Smay, Salt Lake City, for Appellee and Cross-appellant.
Before Judges GREENWOOD, McHUGH, and ORME.

OPINION
McHUGH, Judge:
¶ 1 On appeal from a bench trial, Slone Porter (Porter) challenges the district court's ruling that he breached a contract with Tracy Cowley (Cowley). Porter argues, first, that the district court's judgment should be reversed because it is based on claims not asserted in Cowley's complaint, and second, that several of the district court's factual findings relating to the terms of the contract are clearly erroneous. Cowley cross-appeals, asserting that the district court erred in dismissing Veralynn Porter, Slone Porter's wife (Veralynn), as a defendant. Cowley also argues that he should have been awarded attorney fees because Porter's defense was asserted without merit and in bad faith. See Utah Code Ann. § 78-27-56 (2002). We affirm in part and reverse in part.

BACKGROUND
¶ 2 The district court set forth detailed findings of facts in its ruling after trial. Thus, "we relate the facts granting due deference to the trial court's resolution of factual disputes." Spears v. Warr, 2002 UT 24, ¶ 2, 44 P.3d 742.
¶ 3 Porter had been employed by 7-Eleven, Inc. (7-Eleven) for over fourteen years, beginning in February 1981 and ending when he was laid off in November 1995. At the time Porter was laid off, Cowley was employed as the Area Facilities Manager for 7-Eleven and had responsibility for approving all outside maintenance contracts for stores in Utah, as well as the responsibility to oversee that maintenance work. As a matter of corporate policy, 7-Eleven published a Code of Business Conduct that prohibited employees from engaging in conflicts of interest, which expressly included business relationships between any outside companies and any current employees or former employees for a certain restricted time period.
¶ 4 Despite the clear prohibition on such arrangements, Porter and Cowley, then both current 7-Eleven employees, and Bill Berg, a non-7-Eleven employee who was already doing 7-Eleven landscape work, formed Advanced Maintenance Services (AMS)[1]. The company was incorporated in Utah on December 6, 1994, for the purpose of entering into contracts with 7-Eleven for general maintenance of its stores. Berg, Cowley, and Porter had equal ownership in AMS, although no stock certificates were ever issued. *1227 The participation of Cowley and Porter in AMS was intentionally concealed from 7-Eleven, and Berg served as the contact between the two companies. AMS was successful in obtaining a number of maintenance contracts with 7-Eleven.
¶ 5 AMS acquired Straight Line Striping, Inc. (SLS), a pavement-marking business, in 1997. In June 1997, following arbitration among the three owners of AMS, Berg relinquished his interest in the company in exchange for cash, the landscaping contracts with 7-Eleven, and two vehicles. Thereafter, Porter and Cowley each owned fifty percent of AMS. Without Berg, AMS could no longer conceal its noncompliance with 7-Eleven's Code of Business Conduct. Consequently, Porter requested permission to own and operate AMS as a contractor with 7-Eleven, despite the fact that the time period during which transactions with former employees were prohibited had not yet elapsed. Jim Craig, the Division Facilities Manager for 7-Eleven, waived the remaining time period and agreed to allow AMS to contract with 7-Eleven, despite Porter's involvement. Although Craig was Cowley's direct supervisor at 7-Eleven, neither Porter nor Cowley informed Craig that Cowley had a fifty percent ownership interest in AMS.
¶ 6 During the next few years, the contracts with 7-Eleven proved lucrative and AMS operated successfully. Porter received compensation from AMS and, although Cowley continued to work for 7-Eleven and provided no direct services to AMS, Cowley also received compensation from AMS. To equalize their compensation under this arrangement, Cowley's payments from AMS were reduced to account for his 7-Eleven salary. Porter and Cowley were each receiving between $10,000 and $14,000 per month for their ownership interest in AMS.
¶ 7 In 2000, Porter and Veralynn (collectively, the Porters), together with Cowley and his wife Kerin Cowley (Kerin) (collectively, the Cowleys), formed a new Utah corporation called Listo, Inc. (Listo). Listo was a holding company that owned title to two pieces of real property purchased with funds from AMS. One property was located in Midway, Utah, and the other in St. George, Utah.
¶ 8 Subsequently, Johan de Besche replaced Craig as the Division Facilities Manager for 7-Eleven and became Cowley's direct supervisor. He began to scrutinize the AMS invoices. In February 2001, de Besche confronted Cowley about a family vacation to Hawaii that the Cowleys and the Porters had taken together because he was concerned that AMS may have paid the Cowleys' travel expenses. Fearing that de Besche would discover his connection with AMS, Cowley resigned from 7-Eleven effective March 31, 2001. He then began working directly for AMS and drawing the same salary as Porter. Although de Besche learned of Cowley's employment with AMS, he still was unaware that Cowley owned fifty percent of the company.
¶ 9 Ann Atkin was hired by 7-Eleven to replace Cowley as the Area Facilities Manager. In connection with those duties, she began a detailed review of all of the AMS invoices. Atkin discussed her concerns about the invoices with Porter. At this point, the Porters became concerned that AMS might lose the 7-Eleven contracts if Cowley remained involved with the company.
¶ 10 On June 22, 2002, the Porters arranged a meeting with the Cowleys at the AMS offices in Midway, Utah. At that meeting, the Porters offered to buy Cowley's interest in AMS for $600,000, to be paid over five years at $10,000 per month, without interest. As part of this offer, the Cowleys also would receive SLS, and Cowley would be given his choice of either property owned by Listo. The Porters tape-recorded this meeting. The Cowleys were "stunned" by the offer and left the meeting without accepting it. Later that evening, Cowley called Porter and suggested that if Porter thought the offer was fair, then Cowley should retain AMS and buy Porter out for the amount offered. Porter refused this counter-offer and warned Cowley that AMS would lose the 7-Eleven contracts if Cowley's ownership in AMS became known to 7-Eleven. Cowley indicated that he was confident he could keep the 7-Eleven work.
*1228 ¶ 11 After participating for over seven years in a scheme to deceive 7-Eleven about Cowley's ownership interest in AMS, Veralynn suddenly decided to inform 7-Eleven of the true nature of the relationship. On June 22, 2002, without first notifying the Cowleys, Veralynn informed Atkin, Cowley's replacement at 7-Eleven, that Cowley had been an owner of AMS since its formation. Veralynn also told Atkin that Cowley had threatened a hostile takeover of AMS that would interfere with the work it performed for 7-Eleven. On June 23, 2002, at a meeting with the Porters, Atkin indicated that she would have to inform her supervisor, de Besche, and 7-Eleven's legal department about the situation. Atkin was unsure whether 7-Eleven would continue to contract with AMS.
¶ 12 On the evening of June 23, 2002, the Cowleys and the Porters met again to discuss the future of AMS. The Porters told the Cowleys about Veralynn's conversation with Atkin, which effectively negated any possibility that the Cowleys could purchase AMS from Porter. The meeting was tape-recorded by the Porters.
¶ 13 After the meeting, the Cowleys agreed that they should accept the buyout terms previously offered by the Porters, with certain changes. Because Kerin was accompanying a youth group on an out-of-state trip leaving early the next morning, Cowley arranged to meet with the Porters alone.
¶ 14 On the morning of June 24, 2002, Cowley met with the Porters. That meeting was again tape-recorded by the Porters. Cowley identified additional terms that he wanted to be included in the buyout, and Veralynn Porter typed up a new agreement that incorporated Cowley's changes. Veralynn then printed two copies of the agreement, which was entitled "Partnership Buy-Out." Porter executed one copy of the agreement and placed it on the desk. Veralynn did not execute the agreement and Cowley did not request that she do so. Cowley indicated that the terms of the agreement were acceptable to him, but that he wanted to read it to Kerin before signing. Cowley attempted to contact Kerin by cell phone, but was unsuccessful. The Porters left, taking the copy of the agreement Porter had signed with them. Cowley never signed the second copy of the agreement. Instead, he left it on the desk with a note stating: "VeraCall me. T.C." The Porters retained both copies of the agreement.
¶ 15 On the afternoon of June 24, 2002, Cowley called Atkin to confirm that SLS could continue to do striping work for 7-Eleven. Atkin informed Cowley that 7-Eleven would not do business with any company associated with Cowley.
¶ 16 At the direction of Atkin, the Porters formed a new company, Quality Maintenance Systems (QMS), on June 25, 2002. QMS performed the work previously done by AMS. 7-Eleven agreed to work with QMS as long as Cowley was not involved.
¶ 17 On June 27, 2002, de Besche and Atkin held separate meetings with the Porters and Cowley. Both the Porters and Cowley independently informed de Besche that Cowley had agreed to sell his interest in AMS to the Porters and would have no further involvement with the company. The notes of the meetings kept by Atkin indicate that the Porters showed de Besche a copy of the June 24, 2002 agreement signed by Porter. After the meetings, de Besche agreed that QMS could continue to provide the same services to 7-Eleven that had previously been performed by AMS on a time-and-materials basis, so long as Cowley had no involvement with the new company.
¶ 18 The Cowleys and the Porters then began performing the terms of the June 24, 2002 agreement. Specifically, Cowley vacated the AMS offices and delivered the previous AMS employees, equipment, stock account, books, and premises to the Porters. Porter and Cowley divided equally between themselves the $50,000 in an AMS investment account and the accounts receivable. SLS was transferred to the Cowleys and the logos on the premises and equipment of AMS were changed to those of QMS. In addition, one of the properties held by Listo and some vehicles were transferred to the Cowleys. During this time period, the Cowleys asked the Porters for copies of the tape-recorded meetings, which Veralynn agreed to provide.
*1229 ¶ 19 On July 19, 2002, the Cowleys and the Porters met to discuss an inventory of equipment and supplies belonging to SLS and AMS. At this meeting, the Porters stated that because the contracts with 7-Eleven were on a time-and-materials basis until QMS could potentially enter into new contracts with 7-Eleven in the fall, they could not afford to pay the Cowleys $10,000 per month. Instead, the Porters offered to pay the Cowleys $4000 per month, pending QMS's rebidding of the 7-Eleven contracts. Unlike the previous meetings, this meeting was not tape-recorded. When the Cowleys again asked for copies of the tape recordings of the previous meetings, Veralynn stated that she had destroyed them.
¶ 20 Porter testified at trial that Cowley called him on the evening of July 19, 2002, and accepted his offer of $4000 per month over five years, or $240,000 total, as a final agreement to purchase Cowley's share of AMS. In contrast, the Cowleys testified that they agreed to accept $4000 per month as an accommodation to the Porters and only until QMS was able to enter into new contracts with 7-Eleven. At that time, the Cowleys understood that the original provision mandating payment of $10,000 per month over five years, or $600,000, would be restored.
¶ 21 On July 21, 2002, Porter filed Articles of Dissolution for AMS, indicating that no agreement of shareholders was necessary because AMS did not have any shareholders.
¶ 22 In October 2002, the Cowleys learned that QMS had obtained the new 7-Eleven contracts. Although these contracts were not identical to those held by AMS, they were substantially the same and had a similar monetary value. On October 21, 2002, the Cowleys demanded that the Porters begin paying $10,000 per month, as originally agreed. The Porters agreed to consider bringing the payments up to $10,000 per month. Upon further consideration, the Porters responded that their attorney had advised them that they had an enforceable oral agreement to pay only $4000 per month over five years. The Porters paid the Cowleys $4000 per month from August 2002 to the time of trial.
¶ 23 On May 15, 2003, the Cowleys filed the complaint in this action, claiming that the Articles of Dissolution had been improperly filed. The Cowleys asked the district court to judicially dissolve the company and divide the value of AMS between the two parties. The Porters answered by asserting, among other defenses, that AMS had already been properly dissolved.
¶ 24 During the proceedings, the Cowleys changed their legal theory and asked the trial court to enforce the June 24, 2002 agreement executed by Porter, in which Porter agreed to pay Cowley $600,000, at the rate of $10,000 per month over five years. The Porters denied that the agreement of June 24, 2002, was binding and instead argued that the buyout agreement was for a total of $240,000, to be paid at the rate of $4000 per month over five years, as agreed on July 19, 2002.
¶ 25 After denying a series of motions to dismiss and for summary judgment, the trial court ordered that the trial would be bifurcated. The first trial was to determine whether the parties had entered a binding contract to buy out Cowley's interest and the terms of any such contract. If the court concluded that there had been no agreement, it would then proceed to the second phase of trial to determine the value of AMS for purposes of judicial dissolution. The parties were notified that the second phase would not be necessary if the trial court found an enforceable buyout agreement. A bench trial on the existence of and terms of a buyout agreement between the parties was held on June 1 and 2, 2004.
¶ 26 After trial, the Cowleys again changed their position and asked the court to judicially dissolve AMS and set its value as of June 22, 2002. They selected that date because it was prior to Veralynn's disclosures to 7-Eleven about Cowley's ownership interest in AMS. On July 7, 2004, the court granted the Porters' motion to dismiss Veralynn as a defendant and Kerin as a plaintiff.
¶ 27 The trial court entered detailed Findings of Fact and Conclusions of Law on September 10, 2004, in which it determined that the parties had entered into an oral buyout agreement on June 24, 2002. The *1230 court found that Porter agreed to purchase Cowley's interest in AMS for $600,000, to be paid at the rate of $10,000 per month over five years. Although the agreement was never reduced to a binding written agreement, the court concluded that it was enforceable despite the statute of frauds because it had been partially performed. In reaching that conclusion, the trial court found that the credibility of both the Cowleys and the Porters was suspect, expressly finding that both sides had made conflicting statements in affidavits, depositions, and trial testimony. In particular, the court noted in its findings of fact that although Veralynn told the Cowleys at their July 19, 2002 meeting that she had already destroyed the tape recordings of their previous meetings, she testified at trial that she threw them into the Jordanelle Reservoir on July 24, 2002. The court also determined that both parties had participated in a scheme to deceive 7-Eleven as to the actual ownership of AMS over a span of many years.
¶ 28 With respect to the $4000 payments made from August to October of 2002, the trial court found that the Cowleys agreed to accept reduced payments as an accommodation to the Porters. The trial court further found that the payments were to be raised to $10,000 per month as soon as 7-Eleven renewed maintenance contracts with QMS. These contracts were renewed in October 2002. The court concluded that Porter was in breach of the June 24, 2002 oral buyout agreement as of October 2002 when, although QMS had entered into new contracts with 7-Eleven, Porter refused to increase the monthly payments to $10,000. Finally, the court determined that the Porters' interaction with 7-Eleven representatives coerced the Cowleys into selling Cowley's interest in AMS and constituted a breach of the duty of good faith and fair dealing to the company and Cowley.
¶ 29 In accordance with its findings and conclusions, the trial court ordered Porter to pay Cowley $10,000 per month until the entire $600,000 obligation is paid in full. The court also ordered each party to bear its own costs and fees incurred in the litigation.
¶ 30 On appeal, Porter alleges that the trial court erred by fashioning a remedy not pleaded by either party. He also challenges paragraphs 33, 36, and 37 of the trial court's findings of fact as being clearly erroneous. Cowley cross-appeals claiming error in the trial court's dismissal of the claims against Veralynn and in its decision not to award attorney fees to Cowley.

ISSUES AND STANDARDS OF REVIEW
¶ 31 Porter's claim that the trial court erred in entering judgment against him on a theory not raised by the pleadings involves a conclusion of law that we review under a correction-of-error standard. See Farr v. Brinkerhoff, 829 P.2d 117, 119 (Utah Ct.App. 1992).
¶ 32 Porter also challenges several of the trial court's findings of fact.
While we accord no particular deference to a trial court's conclusions of law, a challenge to findings of fact must show that the evidence, viewed in a light most favorable to the trial court, is legally insufficient to support the contested finding. The challenging party must marshal all the supporting evidence and demonstrate its insufficiency.
Utah Dep't of Soc. Servs. v. Adams, 806 P.2d 1193, 1197 (Utah Ct.App.1991) (citations omitted).
¶ 33 Cowley argues in his cross-appeal that it was improper to dismiss Veralynn as a party because she was necessary to the proceedings. Whether it was error to grant the motion to dismiss is a question of law reviewed for correctness. See Canyon Meadows Home Owners Ass'n v. Wasatch County, 2001 UT App 414, ¶¶ 6-7, 40 P.3d 1148.
¶ 34 Cowley also challenges the trial court's failure to award him his attorney fees under Utah Code section 78-27-56, which provides for the award of fees when a claim or defense is asserted without merit and in bad faith. See Utah Code Ann. § 78-27-56 (2002). "Whether the trial court properly interpreted the legal prerequisites for awarding attorney fees under section 78-27-56 is a `question of law' that we `review ... *1231 for correctness.'" Still Standing Stable, LLC v. Allen, 2005 UT 46, ¶ 8, 122 P.3d 556 (alteration in original) (citation omitted). "In contrast, it is within the discretion of the trial court to determine whether an action is asserted in bad faith, and we therefore review such a determination under the clearly erroneous standard." Warner v. DMG Color, Inc., 2000 UT 102, ¶ 21, 20 P.3d 868.

ANALYSIS

I. Failure to Amend Pleadings
¶ 35 Porter first argues that the judgment in favor of Cowley should be reversed because the pleadings were never amended to include a claim for breach of contract. Porter further contends that even if the trial court could properly consider the contract claim, it went beyond the matters at issue when it entered judgment against Porter according to the terms of the contract it determined existed. We disagree.
¶ 36 Rule 8(a) of the Utah Rules of Civil Procedure sets forth the general pleading requirements, stating that a complaint "shall contain ... a short and plain statement of the claim showing that the pleader is entitled to relief." Utah R. Civ. P. 8(a)(1). The rule is designed to provide notice of the nature of the claims asserted against a defendant and an opportunity to meet those claims. See Williams v. State Farm Ins. Co., 656 P.2d 966, 971 (Utah 1982). Rule 8(f) provides that "[a]ll pleadings shall be so construed as to do substantial justice." Utah R. Civ. P. 8(f). "Pleadings" include both the complaint and the answer. Utah R. Civ. P. 7(a) (emphasis omitted). "When issues not raised by the pleading are tried by express or implied consent of the parties, they shall be treated in all respects as if they had been raised in the pleadings." Utah R. Civ. P. 15(b). An amendment of the pleadings to conform to the evidence can be made by either party at any time, even after judgment is entered. See id. Yet, the failure to amend "does not affect the result of the trial of these issues." Id. Finally, rule 54(c)(1) of the Utah Rules of Civil Procedure states that "every final judgment shall grant the relief to which the party in whose favor it is rendered is entitled, even if the party has not demanded such relief in his pleadings." Utah R. Civ. P. 54(c)(1); see also Guardian State Bank v. Stangl, 778 P.2d 1, 8 (Utah 1989) (stating principle that a court can enter judgment reforming a contract where the pleadings sought declaratory judgment); Clark v. Second Circuit Court, 741 P.2d 956, 957-58 (Utah 1987) (holding that the failure to amend a petition for an extraordinary writ did not affect the fact that issues were tried by consent of the parties); Behrens v. Raleigh Hills Hosp., Inc., 675 P.2d 1179, 1182 (Utah 1983) (holding that if plaintiff was able to adduce the necessary evidence at trial, she could claim punitive damages without formal amendment to the pleadings); Farr v. Brinkerhoff, 829 P.2d 117, 119-20 (Utah Ct.App. 1992) (rejecting defendants' argument that, because the relief had not been sought by the pleadings, the trial court erred by setting aside a sheriff's sale).
¶ 37 The fundamental purpose of these rules is to "liberaliz[e] both pleading and procedure to the end that the parties are afforded the privilege of presenting whatever legitimate contentions they have pertaining to their dispute." Cheney v. Rucker, 14 Utah 2d 205, 381 P.2d 86, 91 (1963). In Cheney, the Utah Supreme Court held that the failure of the defendants to plead a subsequent agreement as an affirmative defense was not fatal to the trial court's consideration of that agreement. See id. In rejecting the plaintiff's argument to the contrary, the court explained:
What [a party is] entitled to is notice of the issues raised and an opportunity to meet them. When this is accomplished, that is all that is required. Our rules provide for liberality to allow examination into and settlement of all issues bearing upon the controversy, but safeguard the rights of the other party to have a reasonable time to meet a new issue if he so requests. Rule 15(b) [of the Utah Rules of Civil Procedure] so states.
Cheney, 381 P.2d at 91 (footnote omitted); see also Armed Forces Ins. Exch. v. Harrison, 2003 UT 14, ¶ 24, 70 P.3d 35 (holding that the failure to plead fraud with particularity was not fatal where the defendant had *1232 notice and an opportunity to respond); Motivated Mgmt. Int'l v. Finney, 604 P.2d 467, 468 (Utah 1979) (holding, under rule 54(c)(1), that the plaintiff's complaint was not defective, even though it sought to foreclose a lien that on appeal the plaintiff conceded was invalid, because the complaint also sought a judgment for money damages against the defendants); PLC Landscape Constr. v. Piccadilly Fish `N Chips, Inc., 28 Utah 2d 350, 502 P.2d 562, 563 (1972) (holding that the trial court properly allowed recovery on the basis of quantum meruit, even though the complaint sought relief on the basis of an express contract, because the defendant was not "denied a fair opportunity to meet the change in theory of recovery"); Buehner Block Co. v. Glezos, 6 Utah 2d 226, 310 P.2d 517, 519-20 (1957) (holding that the trial court properly considered the issue of partnership, although it was not formally raised by the pleadings, because both parties presented evidence on the issue at trial); Shinkoskey v. Shinkoskey, 2001 UT App 44, ¶ 6 n. 2, 19 P.3d 1005 (holding that the trial court properly ordered the appellant to repay funds misappropriated from his children's custodial accounts, even though that issue was not raised in the pleadings, because he "had the opportunity to prepare and meet the issue"); Consolidated Realty Group v. Sizzling Platter, Inc., 930 P.2d 268, 275-76 (Utah Ct.App.1996) (rejecting argument that the trial court impermissibly granted relief on a theory not pleaded where the defendant had notice and an opportunity to respond); Henderson v. For-Shor Co., 757 P.2d 465, 472 (Utah Ct.App.1988) (holding that trial court properly considered an overcharge claim, despite the fact that it was not formally raised in the pleadings, because the appellant failed to show it was prejudiced by consideration of the claim).
¶ 38 Rule 54(c)(1)
requires trial courts to be liberal in awarding appropriate relief justified by the facts developed at trial, as long as the failure to request a particular form of relief does not prejudice a party in the preparation or trial of the case. If there is no prejudice, it is necessary only that the relief granted be supported by the evidence and be a permissible form of relief for the claims litigated.
Henderson, 757 P.2d at 472 (quotations and citations omitted). Porter has not been prejudiced here and his reliance on Combe v. Warren's Family Drive-Inns, Inc., 680 P.2d 733 (Utah 1984), is misplaced. In Combe, a dispute arose between the two shareholders of a closely held corporation. See id. at 734. The corporation initiated an action against the minority shareholder for, among other things, misappropriation of corporate assets and an accounting. See id. at 734-35. Although neither party sought dissolution of the corporationlet alone a partnershipthe trial court entered findings and conclusions that the entity was actually a partnership, by their actions the parties had evidenced an intent to dissolve the partnership, and the assets of the de facto partnership should be distributed as set forth in the trial court's order. See id. at 735. The trial court also ruled that the parties should "flip a coin" to determine which of them could retain the trademark, trade name, and logo of the business. Id. Not surprisingly, the Utah Supreme Court reversed the decision of the trial court holding that rule 54(c)(1) "does not go so far as to authorize the granting of relief on issues neither raised nor tried." Id.
¶ 39 This is not a case where the trial court granted relief on a theory that was neither pleaded nor tried. Porter had ample notice of the contract claim against him and was afforded the opportunity to meet that claim. The Cowleys' complaint sought judicial dissolution of AMS. In their answer, the Porters asserted as an affirmative defense that "[AMS] was properly dissolved." The Porters alleged that Porter entered into a binding contract to buy out Cowley for $240,000, paid in installments of $4000 per month over five years. In contrast, the Cowleys argued that a binding buyout agreement had been reached between Porter and Cowley, but that Porter was to buy out Cowley for $600,000, to be paid in installments of $10,000 per month over five years. From the record below, it is apparent that Porter was on actual notice of the conflicting theories regarding a binding buyout agreement.
*1233 ¶ 40 The Porters' memorandum in opposition to the Cowleys' motion for summary judgment frames one of the disputed facts as follows:
It is undisputed that [the Porters] have made payments of $4,000.00 per month to [the Cowleys] in accordance with the agreement reached on July 19, 2002. It is disputed, as properly noted by the [c]ourt in its prior two rulings[,] that there was ever an agreement between the parties concerning the payment of more than $4,000.00 per month, which issue has been set for trial in June 2004.
That memorandum goes on to state that there are remaining "issues of material fact concerning whether there was a meeting of the minds sufficient to support an agreement, and the terms of that agreement, and whether the agreement reached by the parties is enforceable under the [s]tatute of [f]rauds." Thus, the Porters' own submissions to the trial court reveal that Porter was on notice that the existence and terms of a buyout agreement were at issue.
¶ 41 Indeed, the first phase of the trial was for the specific purpose of determining whether a binding buyout agreement had been reached and the terms of any such agreement. The fact that Porter understood that Cowley was seeking to enforce a buyout agreement for $600,000 is expressly provided in the trial brief the Porters filed, which states:
As stated by the [c]ourt, presently before the court for trial are essentially two issues: (1) whether the agreement between the parties called for the payment from... Porter to ... Cowley in the total amount of $240,000 or $600,000[,] paid in monthly installments over five years for... Cowley's portion of the capital assets of AMS; and (2) whether there has been sufficient part performance by the parties to bring the oral agreement under an exception to the requirements of the [s]tatute of [f]rauds, so that the agreement is legally enforceable and binding.
The trial transcript reflects that each party put on evidence supporting its version of the terms of the buyout agreement. Because Porter had notice of Cowley's $600,000 contract claim and the opportunity to refute that claim at trial, he cannot claim prejudice from Cowley's failure to amend the pleadings.

II. Challenge to Findings of Fact
¶ 42 Porter challenges paragraphs 33, 36, and 37 of the trial court's findings of fact. In doing so, he undertakes a significant burden.
[W]e review the trial court's findings of fact for clear error, reversing only where the finding is against the clear weight of the evidence, or if we otherwise reach a firm conviction that a mistake has been made. To succeed in its challenge to findings of fact, [an appellant] may not simply reargue [his] position based on selective excerpts of evidence presented to the trial court. Instead, [the appellant] must first marshal all the evidence in support of the finding and then demonstrate that the evidence is legally insufficient to support the finding even when viewing it in a light most favorable to the court below.
ProMax Dev. Corp. v. Mattson, 943 P.2d 247, 255 (Utah Ct.App.1997) (quotations and citations omitted). Porter has not met this burden.
¶ 43 In paragraph 33 of its findings of fact, the trial court states that "[a]fter June 27, 2002, the parties began to perform the terms of the written buy[]out agreement of June 24th." That finding then goes on to identify the specific acts performed. Paragraphs 36 and 37 of the trial court's findings of fact provide that the Cowleys agreed to accept $4000 per month as an accommodation to the Porters until the 7-Eleven contracts were reissued to QMS. In his brief on appeal, Porter admits that there was evidence presented from which the trial court could have made these findings. He argues, however, that the weight of the evidence was in favor of the Porters and that the Cowleys' testimony was not credible in light of their prior contrary statements. This "is nothing but an attempt to have this [c]ourt substitute its judgment for that of the trial court on a contested factual issue. This we cannot do under Utah Rule of Civil Procedure 52(a)." Covey v. Covey, 2003 UT App 380, ¶ 28, 80 P.3d 553 (alteration in original) (quotations *1234 and citation omitted), cert. denied, 90 P.3d 1041 (Utah 2004). Furthermore, we must defer to the trial court on issues of credibility because it is "in the best position to assess the credibility of the witnesses and to gain a sense of the proceeding as a whole. Where contradictory testimony is offered . . ., [t]he fact finder is free to weigh the conflicting evidence presented and to draw its own conclusions." Valcarce v. Fitzgerald, 961 P.2d 305, 314 (Utah 1998) (second alteration in original) (quotations and citations omitted). In this case, the trial court expressly noted that the inconsistent positions taken by both sides at various stages of the litigation raised questions concerning the credibility of each party.
¶ 44 Porter has failed to demonstrate that the trial court's findings of fact are "against the clear weight of the evidence," or that the evidence was "legally insufficient to support the finding[s]." ProMax Dev. Corp., 943 P.2d at 255 (quotations and citations omitted). In addition, there is adequate evidence in the record from which the trial court could have made the findings. Therefore, we reject Porter's challenge to the trial court's findings of fact.

III. Dismissal of Veralynn Porter
¶ 45 In his cross-appeal, Cowley argues that the trial court improperly dismissed Veralynn as a defendant. Cowley's argument is based on the assertion that Veralynn, although not an owner of AMS, was a purchaser of Cowley's interest in the company.[2] Because the trial court found an enforceable buyout agreement in which Veralynn was instrumental, Cowley argues that judgment should have been entered against both of the Porters. We agree.
¶ 46 The appellate courts of this State have held that findings of fact "must show that the court's judgment or decree follows logically from, and is supported by, the evidence." Parduhn v. Bennett, 2005 UT 22, ¶ 24, 112 P.3d 495 (quotations and citation omitted). Where the trial court's conclusions of law do not properly follow from the findings of fact, those conclusions can be overturned on appeal. See System Concepts, Inc. v. Dixon, 669 P.2d 421, 429 (Utah 1983) (reversing conclusion of law that an injunction should not issue because it was not supported by the findings of fact); Johnson v. Bell, 666 P.2d 308, 312 (Utah 1983) (reversing conclusion of law that the plaintiff's possession was not open and notorious to the extent required by law because it did "not properly follow from the findings of fact").
¶ 47 Here, the trial court made numerous factual findings that indicate that Veralynn, although not an owner of AMS originally, was a joint purchaser of Cowley's share in the company. For example, the findings of fact state:
20.... At the [June 22, 2002] meeting, the Porters indicated they wanted to buy out... Cowley's interest in AMS....
....
25. During the evening of June 23, the Cowleys agreed among themselves that they would accept the buy[]out terms submitted by the Porters, with certain changes that Mr. Cowley would submit to the Porters on June 24th....
....
31.... Both Cowley and the Porters informed Mr. de Besche that Cowley had agreed to sell out to the Porters and would leave AMS....
....
33.... Cowley vacated the AMS offices in Midway, delivering the previous AMS employees, equipment, stock account, books[,] and premises to the Porters. . . .
....
41. On October 21, 2002, the Cowleys demanded that the Porters bring the payments for the buy[]out of AMS up to the $10,000/month level.... The Porters said they would consider starting to make the $10,000/month payments and get back to them.
....

*1235 43. The Porters have paid the Cowleys $4,000/month from August[] 2002 through the time of trial.
....
(Emphasis added.) These findings, combined with the undisputed fact that Veralynn owned fifty percent of QMS when it made the $4000 per month payments to Cowley and when Cowley transferred the AMS assets to it as partial performance of the buyout agreement, indicate that Veralynn, together with Porter, purchased Cowley's interest in AMS.
¶ 48 Paragraph 1 of the trial court's conclusions of law states: "There is no need to judicially dissolve AMS because the parties entered into an enforceable contract wherein... Porter agreed to buy[ ]out ... Cowley's interest in AMS...." (Emphasis added.) While it may have struck the trial court that the two wives should be treated identically, that conclusion does not logically follow from the findings of fact entered by the trial court. Consequently, the conclusion of law that only Porter is in breach is incorrect. We therefore reverse and remand for the amendment of the judgment to include Veralynn, as well as Porter.

IV. Attorney Fees
¶ 49 Cowley also claims that the trial court erred by not awarding him attorney fees under Utah Code section 78-27-56. See Utah Code Ann. § 78-27-56 (2002). We disagree.
¶ 50 Section 78-27-56 provides, in relevant part, that "[i]n civil actions, the court shall award reasonable attorney[] fees to a prevailing party if the court determines that the action or defense to the action was without merit and not brought or asserted in good faith." Id. § 78-27-56(1). To award fees under section 78-27-56, the trial court must make two separate findings: "that the claim[ or defense] is (1) without merit; and (2) not brought or asserted in good faith." In re Discipline of Sonnenreich, 2004 UT 3, ¶ 46, 86 P.3d 712; see also Still Standing Stable, LLC v. Allen, 2005 UT 46, ¶¶ 9-16, 122 P.3d 556 (reversing award of attorney fees under section 78-27-56 where trial court did not make separate findings that claim was brought in bad faith and without merit); Paul deGroot Bldg. Servs., L.L.C. v. Gallacher, 2005 UT 20, ¶ 15, 112 P.3d 490 (affirming trial court's denial of attorney fees under section 78-27-56).
¶ 51 Despite Cowley's reliance on section 78-27-56, nowhere does the trial court find that Porter asserted a defense or brought a claim "without merit" or not "in good faith." Utah Code Ann. § 78-27-56(1). Indeed, the record indicates that the trial court rejected Cowley's request for a conclusion of law that stated: "The defense herein has been without merit and in bad faith, under [section] 78-27-56...."
¶ 52 Furthermore, although the trial court ruled in favor of Cowley and against Porter after the trial on the merits, that is not enough to justify an award of fees under section 78-27-56. See Sonnenreich, 2004 UT 3 at ¶ 46, 86 P.3d 712 (stating that section 78-27-56 "is narrowly drawn and not meant to be applied to all prevailing parties in all civil suits" (quotations and citation omitted)). Most relevant to our review of the trial court's refusal to award fees to Cowley is the trial court's specific finding that the credibility of both parties was difficult to ascertain because each had given inconsistent statements throughout the litigation. Given this finding, and because "it is within the discretion of the trial court to determine whether an action is asserted in bad faith," Warner v. DMG Color, Inc., 2000 UT 102, ¶ 21, 20 P.3d 868, we cannot say the trial court erred by declining to award Cowley his attorney fees under section 78-27-56.

CONCLUSION
¶ 53 Porter was on notice that Cowley claimed the agreed price of the buyout agreement was $600,000, to be paid at the rate of $10,000 per month over five years. Under rule 54(c)(1) of the Utah Rules of Civil Procedure, the trial court could enter judgment against Porter for breach of that contract, despite Cowley's failure to demand such relief in the pleadings. In addition, the trial court's findings of fact Porter challenges are not clearly erroneous. The trial court's conclusion that only Porter contracted to buy *1236 Cowley's interest does not logically flow from its findings of fact, and therefore, we reverse and remand for an amendment to the judgment to add Veralynn. Finally, the trial court did not err by declining to award Cowley his attorney fees under Utah Code section 78-27-56. See Utah Code Ann. § 78-27-56 (2002). Accordingly, we affirm the decision of the trial court in part, reverse in part, and remand so that the judgment can be amended to include both Veralynn and Porter.
¶ 54 WE CONCUR: PAMELA T. GREENWOOD and GREGORY K. ORME, Judges.
NOTES
[1]  When Porter was laid off by 7-Eleven in November 1995, he became primarily responsible for the daily operations of AMS.
[2]  Although the trial court did not issue a written decision setting forth the reasons for dismissing Veralynn, the transcript of the proceedings states: "I have not seen any evidence that would indicate that either of the wives ... had an ownership interest in [AMS].... And[,] therefore[,][t]he [c]ourt is going to grant the motion to dismiss...."
