opinion: JERRE S. WILLIAMS, Circuit Judge:
  In this appeal we consider whether the district court abused its discretion by entering a default judgment against Shipco General, Inc. or erred in calculating the damages Shipco owes to M-CO Construction, Inc. We uphold the default judgment but reverse and remand the award of damages.
  I. Facts
  The appellant, Shipco General, Inc., is an Idaho corporation that works as a prime contractor on federal government construction projects. In September 1982, the United States hired Shipco to remodel thirty-four quadplexes, or residential buildings, at the Randolph Air Force Base near San Antonio, Texas. Shipco in turn hired subcontractors to perform various tasks. To guarantee its obligations to its subcontractors, Shipco furnished a payment bond from Industrial Indemnity Corp., as required by the Miller Act, 40 U.S.C. § 270a. Shipco then agreed to indemnify Industrial Indemnity for any loss resulting from the surety relationship.
  In January 1983, Joseph McDorman formed M-CO Construction, Inc. That same month, Shipco hired M-CO to work as a subcontractor at the Randolph base. Shipco and M-CO signed three subcontracts: one covered painting work to be done by M-CO; the other two covered a variety of other jobs — including electrical, heating, air conditioning, plumbing, roofing, landscaping, and carpentry work. Each agreement specified the total amount to be paid to M-CO for work performed under that subcontract. M-CO agreed to perform its work “in the most sound, workmanlike ... manner.” In addition, the subcontracts provided that M-CO would not take on extra work without a “written order” from Shipco.
  M-CO began work in January 1983. Every month, M-CO presented receipts and bills for work completed that month, and Shipco paid M-CO for ninety percent of such work. Shipco retained ten percent under the terms of the contract, which also provided that Shipco would pay the retained sums after the remodeling was finished and the United States made final payment to Shipco. On June 24, 1983, Shipco terminated the painting contract on the claim that M-CO performed in an unworkmanlike manner. On August 24, 1983, Shipco terminated the other two subcontracts, asserting the same reason. On August 20, 1984, M-CO sued Industrial Indemnity and Shipco in the Western District of Texas under the Miller Act to recover $29,960 — the “reasonable value” of its uncompensated work.
  II. Shipco Misses the Boat
  Shipco answered the lawsuit, denied liability, and claimed — by affirmative defense and counterclaim — that M-CO failed to perform in a workmanlike manner. Industrial Indemnity cross-claimed for indemnification against Shipco. Shipco hired its regular counsel, Denver Snuffer of Murray, Utah, and local counsel, David Young of San Antonio, to defend the M-CO lawsuit. It was during discovery that Shipco or its attorneys ran aground.
  On April 17, 1985, M-CO noticed the deposition of Shipco’s representative for May 1, 1985 in San Antonio. Shipco neither moved for a protective order nor appeared for the deposition. M-CO moved for sanctions under Rule 37(b), Federal Rules of Civil Procedure, for Shipco’s failure to appear. On June 14, 1985, the district court awarded M-CO $500 in sanctions and warned: “The Court will give defendant one more opportunity to comply with discovery. If plaintiff again files a notice of deposition and defendant again fails to appear, defendant’s answer will be struck and a default judgment rendered.”
  On June 25, 1985, M-CO again noticed Shipco’s deposition, this time for July 3, 1985, in San Antonio. Snuffer did not move for a protective order, but on July 2, he asked M-CO to reschedule the deposition. M-CO refused, and Shipco again failed to appear for the scheduled deposition. M-CO moved for sanctions, including a default judgment.
  The trial was set for August 6,1985. At Docket Call on August 5, Young but not Snuffer appeared for Shipco. When the district court asked Young why a default should not be entered, Young replied:
  You put me on the spot, Judge. I am local counsel for Shipco. I have been ... unsuccessful in locating [Shipco’s] attorney, Mr. Denver Snuffer---- I just called his office ..., and his secretary told me that he was home sick this morning. ...
  I have written to him a number of times without response. I have called his office without response. I really don’t feel that I should say anything substantive on the merits of the case.
  The district court then ordered that Ship-co’s pleadings be struck and entered a default judgment against Shipco.
  On January 2, 1986, the district court held a hearing to determine the amount of M-CO’s damages, and on January 30, the district court issued its final judgment, awarding M-CO $28,026.21 plus attorneys’ fees plus interest since the date M-CO filed suit. The district court also granted a default judgment for Industrial Indemnity against Shipco, awarding attorneys’ fees plus indemnification for any amount M-CO collects from Industrial. In addition, the district court granted partial summary judgment for M-CO against Industrial Indemnity for the amount of the default judgment against Shipco.
  Shipco, having hired new counsel to navigate the troubled waters of this appeal, now challenges the entry of default and the calculation of damages.
  III. The Default Judgment
  Rule 37(b)(2)(C) authorizes a district court to strike pleadings of and enter a default judgment against a party that fails to comply with a discovery order. See National Hockey League v. Metro Hockey Club, Inc., 427 U.S. 639, 96 S.Ct. 2778, 49 L.Ed.2d 747 (1976); Batson v. Neal Spelce Associates, Inc., 765 F.2d 511 (5th Cir.1985). We review the entry of a default judgment for abuse of discretion. Batson, 765 F.2d at 514; Bluitt v. Arco Chemical Co., 777 F.2d 188, 190 (5th Cir.1985).
  Rule 55(c) provides that a district court may set aside a default judgment “for good cause shown,” and we also review a district court’s refusal to set aside a default judgment for abuse of discretion. See United States v. One Parcel of Real Property, 763 F.2d 181, 183 (5th Cir.1985). Bat-son enumerated four factors that the district court should consider before granting a default judgment: (1) whether the violation was willful or in bad faith rather than simply due to inability to comply, (2) whether less drastic sanctions would effect the goals of Rule 37(b), (3) whether the violation prejudiced the opposing party’s trial preparation, and (4) whether the client knew of or participated in the violation or simply misunderstood a court order or innocently hired a derelict attorney. Batson, 765 F.2d at 514. Batson also held that the district court must consider expressly the effectiveness of less severe sanctions. Id. at 516.
  Although dismissal and default judgment are “draconian” sanctions that the district court should impose only as a last resort, id. at 515, their use might deter litigants from flouting discovery orders in the future. National Hockey League, 427 U.S. at 643, 96 S.Ct. at 2781. We find that the district court did not abuse its discretion in entering and refusing to set aside the default judgment against Shipco.
  The district court found that Shipco failed to appear for the May 1 deposition, failed to respond to M-CO’s two motions for sanctions, and failed to explain its behavior at the August 5 Docket Call. In addition, it violated the court’s valid discovery order by failing to appear for the July 3 deposition. The district court also expressly found that a lesser sanction — the $500 fine — had failed to coerce compliance in the past and would not be effective a second time. We have upheld dismissals under Rule 37(b)(2)(C) against a party that misses a deposition appearance in violation of a court order. See Bonaventure v. Butler, 593 F.2d 625, 626 (5th Cir.1979); Kabbe v. Rotan Mosle, Inc., 752 F.2d 1083, 1084 (5th Cir.1985). Here, together with other defaults, Shipco missed two.
  Shipco’s appellate counsel argues that we should not punish Shipco for the omissions of its lawyers. The D.C. Circuit recently expressed similar concerns when it reversed a default judgment and instead directed the district court to consider sanctions against the attorney responsible rather than his unwitting client. See Shea v. Donohoe Construction Co., 795 F.2d 1071 (D.C.Cir.1986) (holding that the district court should warn the client — not just its lawyers — before entering a default). We share the D.C. Circuit’s sympathy for a client whose counsel defaulted. But here we stress that the putative author of the default was Shipeo’s regular counsel, having continuity of employment with the company. The district court did not abuse its discretion, and we uphold the entry of default judgment.
  IY. Damages
  Although we affirm the granting of the default judgment, we reverse the award of damages to M-CO and remand for a new determination of damages. Shipco tried to rebut M-CO’s damage claims by showing that M-CO did poor quality work. M-CO argued that the district court’s sanction established that Shipco breached, that M-CO did not, and, therefore, that M-CO performed “in the most ... workmanlike” way, as required by the contract. The district court excluded Shipco’s evidence of poor quality and did not explain how and under what theory it calculated M-CO’s damages.
  A default judgment is a judgment on the merits that conclusively establishes the defendant’s liability. But it does not establish the amount of damages. TWA v. Hughes, 449 F.2d 51, 70 (2nd Cir.1971), rev’d on other grounds, 409 U.S. 363, 93 S.Ct. 647, 34 L.Ed.2d 577 (1973); G.C. Merriam Co. v. Webster Dictionary Co., 639 F.2d 29, 34 (1st Cir.1980). After a default judgment, the plaintiff's well-pleaded factual allegations are taken as true, except regarding damages. Au Bon Pan Corp. v. Artect, Inc., 653 F.2d 61, 65 (2nd Cir.1981); Nishimatsu Construction Co. v. Houston National Bank, 515 F.2d 1200, 1206 (5th Cir.1975).
  In its original complaint, M-CO stated that it “performed work and provided certain materials, equipment, and services, required pursuant to the ... contracts” and that Shipco terminated the contracts without paying M-CO. The default judgment establishes the truth of these factual allegations. That is, Shipco breached. But the fact that Shipco breached does not establish that M-CO did good quality work, as required by the contract.
  It is clear that the district court intended that its sanction foreclose any discussion about the quality of M-CO’s work. Before the January 2 damages hearing, the district court ruled that Shipco “can challenge [MCO’s] figures but no evidence of counterclaims or offsets of defendants shall be permitted.” This ruling was based upon its earlier order striking Shipco’s pleadings and then granting a default judgment. At the damages hearing, Joseph McDorman, the head of M-CO, testified in support of M-CO’s damage claims. Shipco tried to show that M-CO did poor quality work that “had no value and ... had to be substantially redone by others.” The district court excluded Shipco’s evidence of poor workmanship, holding that, after the default judgment, “quality is [not] an issue.”
  Shipco complains that the district court erred by excluding the evidence of poor quality work. As set out above, the default judgment did not establish that M-CO did good quality work. We hold the case must be remanded, and Shipco can introduce evidence that M-CO did poor quality work in so far as such evidence is relevant to damages.
  In a Miller Act case, state law determines the amount of damages a subcontractor may receive. See United States for the Use of Morgan & Son Earth Moving, Inc. v. Timberland Paving & Construction Co., 745 F.2d 595, 599 (9th Cir.1984). We apply Texas law in holding that the quality of M-CO’s work is relevant to the determination of damages even though Shipco’s pleadings were struck as a sanction. Failure to meet quality standards did not have to be pleaded by Shipco.
  Under Texas law, a plaintiff in a breach of contract suit may pursue a number of alternate theories of recovery. A suit “on the contract” entitles a plaintiff to recover “the contract price less ... the cost ... of completing the work.” McKracken Construction Co. v. Urrutia, 518 S.W.2d 618, 621-22 (Tex.Civ.App.—El Paso 1974, no writ). Alternatively, a suit in quantum meruit measures as damages the value or benefits that the defendant received from the work. See Beeman v. Worrell, 612 S.W.2d 953, 957 (Tex.Civ.App.—Dallas 1981, no writ); Box v. Au Forgeron de la Cour-Dieu, 708 S.W.2d 538, 539-40 (Tex. App.—Texarkana 1986, writ ref’d n.r.e.) (plaintiff may recover for benefits conferred even if it breached contract); Insurance Agency Managers v. Gonzales, 578 S.W.2d 803, 806 (Tex.Civ.App.— Houston 1979, no writ). A non-breaching plaintiff also can claim rescission of the contract and recover “restitution,” that is, “the full value of the work done” or “the reasonable [market] value of the labor and materials [it] has put into the building in accordance with the contract, whether the result has any value to the owner or not.” Beeman, 612 S.W.2d at 957; Urrutia, 518 S.W.2d at 621-22. See also Dill v. Helms, 468 5. W.2d 608, 611 (Tex.Civ.App.—Waco 1971, writ ref’d n.r.e.) (after owner breached, contractor could recover “value of the labor and material expended by [contractor] on the house”); Kleiner v. Eubank, 358 S.W.2d 902, 905 (Tex.Civ.App.—Austin 1962, writ ref’d n.r.e.). Restitution aims “to place the plaintiff in the same economic position as he enjoyed prior to contracting.” J Calamari & J. Perillo, The Law of Contracts §§ 15-3, 15-4 (West 1977); see also 5 A. Corbin, Contracts §§ 996, 1113 (West 1951).
  Obviously, the different theories of recovery require different elements of proof, and a plaintiff must elect which remedy it asserts. In the case before us, the district court awarded M-CO over $28,000 in damages but did not explain how or under what theory it calculated this amount. Even M-CO appeared to be confused about its own theory of recovery. In its original complaint, M-CO stated that the “reasonable value of the performance ... remaining due and payable [is $29,960].” (emphasis added). The term “reasonable value” suggests that M-CO sought to recover in quantum meruit for the benefit conferred on Shipco by the work, or in restitution for the amount M-CO reasonably spent on performance. At the damages hearing, however, M-CO stated that “[t]his is a suit on contract and is not a quantum meruit lawsuit.”
  After Shipco filed its appeal in this case, the Clerk of this Court, as a means of clarification, asked M-CO to explain its theory of damages justifying the district court's award. M-CO responded that it wanted damages for “substantial performance,” as defined in Vance v. My Apartment Steak House, 677 S.W.2d 480 (Tex.1984), and did not want recovery in quantum meruit. According to M-CO, the default judgment established that it performed in a workmanlike manner, and it should recover “the agreed value of the work performed.” Whether M-CO “substantially performed” is a fact question. M-CO did not substantially perform, however, if its work deviated “from the general plan contemplated” or if the amount of work left undone was “so pervasive as to frustrate the purpose of the contract in any real or substantive sense.” O.W. Grun Roofing & Construction Co. v. Cope, 529 S.W.2d 258, 261-62 (Tex.Civ.App.—San Antonio 1975, no writ). See also Turner, Collie & Braden v. Brookhollow, Inc., 642 S.W.2d 160, 164 (Tex.1982) (no substantial performance “where it is necessary, in order to make the building comply with the contract, that the structure, in whole or in material part, must be changed, or there will be damages to parts of the building, or the expense of such repair will be great.”).
  The default judgment established only that M-CO “performed;” it did not establish that M-CO substantially performed the entire contract. The record indicates that M-CO completed work on only four of the thirty-two buildings covered by the contracts. A finding that such progress constitutes “substantial performance” could not be supported. Thus, damages cannot be based upon substantial performance.
  As set out above, the district court repeatedly excluded Shipco’s evidence that M-CO performed in an unworkmanlike manner. Because the district court did not explain how it computed M-CO’s damages, it is impossible to know whether such evidence was relevant and should have been admitted in the absence of being pleaded by Shipco.
  In addition, near the end of the hearing, the district court prevented Shipco’s supervisor, Lance McKinney, from challenging M-CO’s claimed payroll expense. It appears from the record and from an Offer of Proof filed by Shipco that McKinney might have testified that he observed M-CO’s workforce at the Base and that M-CO used its workers inefficiently and overstated the number of workers and the hours they worked. Such evidence would not affect the amount of “benefit conferred” on Ship-co by M-CO. But if the district court based its damages award on M-CO’s reasonable expenditures, it should have let McKinney testify that M-CO exaggerated its expenses.
  V. Conclusion
  In sum, we affirm the granting of a default judgment against Shipco. We reverse and remand, however, the district court’s award of damages. On remand, Shipco must be permitted to show that M-CO performed poor quality work or was wasteful in its expenditures if either quality or waste is relevant to the theory of damages M-CO elects to pursue. Finally, after the new hearing, the judgment of the district court must include findings as to the method of determining the amount of any damages awarded.
  The decision of the district court is
  AFFIRMED IN PART, REVERSED IN PART, AND REMANDED.
  . The Miller Act provides a cause of action for subcontractors who furnish work on government contracts but do not get paid. See 40 U.S.C. 270b.
  . Shipco never answered Industrial Indemnity’s cross-claim for indemnification.
  . Rule 60(b) lists other grounds for relief from a judgment or order.
  . In Batson, the district court dismissed the plaintiffs case under Rule 37(b)(2)(C). Batson also applies when we review the entry of a default judgment against a defendant. See United Artists Corp. v. Freeman, 605 F.2d 854, 856-57 (5th Cir.1979) (same analysis applies to propriety of both default and dismissal under Rule 37).
  . McDorman discussed three types of damages. First, M-CO wanted to collect for work done in July and August, 1983, for which it had not been paid. Second, it wanted to collect Shipco's ten percent retainage. Finally, McDorman presented evidence about “extra” work M-CO performed at Shipco’s oral or written request.
  At the hearing, Shipco complained that M-CO exaggerated its costs at the beginning of the project. McDorman, however, explained how he computed his monthly bill. Apparently, the district court credited McDorman’s version. Shipco also argued that M-CO could take on "extra” work only with written orders. The district court found that Shipco, and prime contractors in general, regularly ignore the requirement of written orders. The district court awarded damages to M-CO for extra work that Shipco requested, and Shipco does not appeal this ruling.
  In addition, Shipco terminated M-CO’s painting contract in June 1983, and the other contracts on August 24, 1983. M-CO filed suit on August 20, 1984. The district court found that M-CO failed to sue on its painting contract within the Miller Act’s one year statute of limitation and awarded no damages for the painting work. See 40 U.S.C. § 270b(b). M-CO does not appeal these findings. Shipco terminated the other two contracts after August 20, 1983, or within one year of M-CO’s suit.
  . As its sanction, the district court struck Ship-co’s pleadings and entered a default judgment under Rule 37(b)(2)(C). It did not impose a fact finding as a sanction under Rule 37(b)(2)(A) that M-CO did good quality work.
  . Even if M-CO had substantially performed, Shipco still could have introduced evidence that M-CO did poor quality work. In Texas, a contractor who substantially performs under a construction contract may recover the contract price less the reasonable cost of remedying any defects or omissions in his work. Atkinson v. Jackson Brothers, 270 S.W. 848 (Tex.Comm’n App.1925); Vance. The contractor has the burden of proving the cost of repairing such defects or omissions, even if the owner files only a general denial that does not identify any defects or omissions. Vance; Dave Boothe Construction v. Johnson, 705 S.W.2d 204 (Tex.App.— Houston 1984, no writ) (noting that contractor can use the discovery process to learn of defects or omissions claimed by the owner). Thus, whether M-CO performed defective or poor quality work would relate to damages.