
725 P.2d 712 (1986)
HOWARD S. LEASE CONSTRUCTION COMPANY & ASSOCIATES, Appellant/Cross-Appellee,
v.
Jerry C. HOLLY, Jr., d/b/a Specialty Excavating, Appellee/Cross-Appellant.
Nos. S-813, S-814.
Supreme Court of Alaska.
October 3, 1986.
*714 Robert J. Dickson, Atkinson, Conway, Bell & Gagnon, Anchorage, for appellant.
Raymond H. Royce, Wade & DeYoung, Anchorage, for appellee.
Before RABINOWITZ, C.J., and BURKE, MATTHEWS, COMPTON and MOORE, JJ.

OPINION
MATTHEWS, Justice.

I. FACTS AND PROCEEDINGS
In 1978 the Howard S. Lease Construction Company was awarded the general contract for construction of the Soldotna Senior High School. Lease subcontracted with Jerry Holly, d/b/a Specialty Excavating, for Holly to perform specified excavation and backfill work. Holly was to be paid $384,920.00.
Lease did the finegrading of the site[1] which, it claimed, was Holly's obligation under the subcontract. Lease billed Holly for $30,632.30 on January 23, 1979, for part of the finegrading. Holly did not pay, claiming that he had not agreed to do the finegrading. Holly continued to perform his other obligations under the subcontract, and on May 25, 1979, he submitted to Lease a bill for $35,000 pursuant to a provision in the contract requiring periodic progress payments. Lease's project foreman told Holly not to plan to get paid since the backcharge for finegrading had not been resolved. Lease finished the finegrading in June 1979, and billed Holly for a total of $52,844.89, but it did pay Holly $10,000 in late June 1979. Holly completed the rest of his obligations under the contract.
By the end of June 1979, Holly owed his gravel supplier, S & B Gravel, approximately $9,500. Holly did not pay S & B out of the $10,000 progress payment. On or about July 20, 1979, S & B refused to deliver any more gravel to Holly. Lease attempted to purchase gravel directly from S & B for 75¢ per cubic yard, which had been the price under Holly's agreement with S & B. S & B would not sell to Lease at this price. Lease ultimately purchased the necessary gravel from S & B for $1.25 per cubic yard.
Among Holly's responsibilities under the subcontract were excavating and filling a running track around the football field. After the track had been completed, the borough requested that it be widened by adding one foot to its inside perimeter. At Lease's request, Holly performed this work, placing 488 cubic yards of fill.
Holly sued Lease, seeking recovery for breach of contract, payment of amounts due under the subcontract, and payment for various items of work done beyond the scope of the contract, including the widening of the running track. Lease counter-claimed for its backcharges, including the finegrading and the excess expenditure for gravel, and for the amounts of claims Holly's suppliers brought against Lease.
Following a non-jury trial, Judge Cranston found that Holly had the responsibility to finegrade generally in the manner claimed by Lease. He allowed $44,440.69 *715 of Lease's total bill of $52,844.89 for finegrading. He found, however, that Lease was not justified in withholding the May progress payment and that the wrongful withholding of the payment caused Holly's inability to pay his gravel supplier. He therefore denied Lease's claim for the expenditure for gravel in excess of 75¢ per cubic yard. Judge Cranston awarded Holly $4,202 for widening the running track and amounts for other items of work. Holly received a net judgment of $26,243.20, which was reduced upon reconsideration to $18,955.05.
Lease appeals the trial court's decision as to the gravel expenditure and the track-widening costs. Holly cross-appeals, claiming the trial court acted without jurisdiction when it reduced his judgment on reconsideration after notice of appeal to this court had been filed; that it improperly denied him a jury trial; and that it erred in its award of attorney's fees and costs to Lease. We reverse the trial court's determination as to the excess expenditure for gravel and as to track-widening costs and affirm in all other respects.

II. DISCUSSION

A. Excess expenditure for gravel

Judge Cranston found that furnishing gravel was Holly's responsibility under the subcontract. He held, however, that the circumstances did not warrant withholding the progress payment. He concluded that Lease wrongfully withheld $25,000 of the $35,000 progress payment billed by Holly in May 1979, causing Holly's inability to pay S & B Gravel. He therefore allowed Lease to recover only an amount based on the 75¢ per cubic yard price.
On appeal, Lease contends that the trial court's finding that it owed Holly $25,000 on the due date for the May progress billing was erroneous and that in fact it paid Holly all that was owed at the time. Lease reasons that each party's valid backcharges owed at the time the progress payment was due should have been included by the trial court in calculating the amount of the progress payment that was due and owing. We agree and hold that Lease did not wrongfully cause Holly's inability to pay S & B Gravel. On remand Lease should be awarded an amount representing the additional expenditure for gravel made necessary by Holly's failure to pay its bill.
Judge Cranston relied on our decision in Arctic Contractors, Inc. v. State, 564 P.2d 30 (Alaska 1977), stating that there
the court recognized that the right to withhold progress payments is limited to circumstances clearly warranting it. The circumstance found by the court in Arctic to warrant withholding of a progress payment was that it be for the purpose of protecting itself from liability from the subcontractor's suppliers and not for some other reason, citing U.S. v. Heyward-Robinson Co., 430 F.2d 1077 (Second Circuit 1970). Here no such ground was stated by Lease. Accordingly, the court concludes that Lease wrongfully withheld payment of the progress amount billed by Holly at the end of May, 1978.
While we did state in Arctic Contractors that "[t]he right to withhold progress payments is limited to circumstances which clearly warrant it," 564 P.2d at 43 (footnote omitted), Judge Cranston otherwise misinterpreted our decision there. We did not hold that the state was justified in withholding a progress payment in order to protect itself from liability from the subcontractor's creditors; rather, we held that the withholding was warranted to induce the contractor to obtain proper bonding as it was contractually obligated to do. 564 P.2d at 43-44. More importantly, we did not purport to limit the court's consideration of when circumstances clearly warrant withholding the progress payment.
A general contractor may be justified in refusing to make a progress payment to the subcontractor when the latter has failed to substantially perform his contractual obligations entitling him to the payment. See 3A Corbin on Contracts § 708 (1960); see also id. § 692 at 273; Restatement (Second) of Contracts § 237, *716 comment d (1981). It follows that the general contractor is entitled to withhold from a progress payment a valid backcharge for work within the scope of the subcontract which the general contractor has had to perform itself. Of course, the contractor runs the risk of guessing wrong as to whether the subcontractor has not substantially performed in the first instance and whether the backcharge is valid in the second.
Here, Judge Cranston found that Holly had the contractual obligation to finegrade. Of the total backcharge of $52,844.89 for finegrading, Judge Cranston found $44,440.60 to be valid. Lease was entitled to withhold this amount from progress payments due July 1, 1979.
Our analysis does not end here, however. On October 17, 1978, Holly had backcharged Lease for various items of work performed not covered by bid and not within his contractual obligations. This was not paid by Lease. Judge Cranston allowed $26,342 of this backcharge. The contract provided that "[b]ackcharges ... shall be promptly paid by the indebted party." We conclude that Holly was entitled to payment of this backcharge by the time the May progress payment was due. Adding this amount to the $35,000 May progress payment billing, the validity of which is not in dispute, gives a total of $61,342 due to Holly. It is undisputed that under the contract Lease was entitled to retain 10% of this amount.[2] Thus, $55,207.80 was actually due and owing to Holly. Subtracting the $44,440.69 justifiably withheld and the $10,000 Lease paid Holly on June 28, 1979, leaves only $767.11 owed to Holly as of the due date for the May progress payment. We conclude that Lease's improper withholding of this relatively insignificant amount did not cause Holly's inability to pay its $9,500 bill with S & B Gravel which in turn resulted in the increased cost of gravel.
Holly argues that Lease could not withhold a portion of the May progress payment because Holly had provided the services for which payment was due prior to receiving notice of intent to withhold. Holly cites this court's statement in Arctic Contractors that "[p]ayments due for services performed before notice has been served may not be withheld, although they may be recoverable in whole or in part as damages for breach of the contract." 564 P.2d at 43. We disagree and take this opportunity to clarify the requirement of notice in Arctic Contractors.
In Arctic Contractors we held that Arctic had a continuing obligation under its contract with the state to furnish adequate bonds. 564 P.2d at 40. We rejected Arctic's argument that by permitting work to proceed after discovering defects in the bonds the state waived its right to require, or was estopped from requiring, Arctic to obtain new bonds. Id. at 40-41. We said that "in order to compel adherence to the contract's bonding provisions, the State, upon furnishing notice of its intent to do so, could properly have withheld payments for work and material furnished after notice was given." Id. at 42. After discussing federal Court of Claims decisions interpreting similar contractual progress payment provisions, we stated:
Progress payments due after notice of intent to withhold has been served on the contractor may be withheld as a source of leverage to assure the contractor's compliance with the terms of the contract. Payments due for services performed before notice has been served may not be withheld... .
Id. at 42-43.
No authority was cited for the apparent bright-line rule requiring notice,[3] nor was *717 the underlying legal theory explained. We decline to require notice prior to withholding progress payments in every case. For example, there appears to be no general requirement of notice prior to withholding a progress payment where the subcontractor has materially breached his promise to perform upon which the prime contractor's promise to make progress payments depends. Thus, in K & G Construction Company v. Harris, 164 A.2d 451 (Md. 1960), the Maryland Court of Appeals held that the contractor was justified in withholding a progress payment for work which had been performed before the subcontractor damaged the structure with a bulldozer. See also 6 Williston on Contractors § 870, at 317-21 (3d ed. 1962) (quoting extensively and with approval K & G Construction); Restatement (Second) of Contracts § 241, illustration 1 (1981) (based on K & G Construction).
Notice is necessary for reinstatement of a condition of the obligor's duty to perform which has been excused by his acceptance of partial performance despite non-occurrence of the condition.[4] In Arctic Contractors, proper bonding was an express condition of the state's duty to perform. See 564 P.2d at 40-41. The state made progress payments after the bond defect was discovered. When it notified the contractor of the defect, the state said nothing about withholding progress payments even though it knew that work was progressing and that the contractor was continuing to incur debts which it expected to cover with the progress payments. Id. at 44. After noting these facts, we concluded, "Under the circumstances withholding the progress payment without notice was improper, and it constituted a breach of the contractual agreement between Arctic and the State of Alaska." Id. We interpret Arctic Contractors as holding that the state's acceptance of Arctic's performance by continuing to make progress payments after it discovered the bonding defects justified Arctic in believing that its continued performance would be accepted and paid for despite the bonding defect. See Restatement (Second) of Contracts § 247, supra n. 4. Therefore, the condition of proper bonding was excused unless and until the state gave proper notice of its reinstatement.
In this case, Holly's performance of his contractual obligations, including finegrading, was a condition of Lease's duty to perform. See K & G Construction, 164 A.2d at 455. In contrast to Arctic Contractors, Lease did not accept Holly's partial performance despite the non-occurrence of the condition. Although Lease continued to make progress payments, it billed Holly for the finegrading. It withheld the applicable portion of the progress payment immediately after completing the finegrading. Holly could not reasonably have believed that his subsequent work would be accepted as fulfillment of his contractual obligations despite his failure to finegrade. Notice was not required prior to withholding a portion of the progress payment for finegrading because the condition had not been excused.


*718 B. Compensation for widening the running track

At Lease's request Holly widened the running track by adding one foot to its inside perimeter. Excavation was necessary, and some 488 cubic yards of fill were placed. The parties agree that this work was beyond the scope of the subcontract.
The subcontract contained two provisions arguably applicable to this situation:
Subcontract General Provisions
(p) Backcharges for work beyond the basic requirements of this subcontract, performed by either party for the benefit of the other party, shall be paid for on the basis of cost plus 10 percent for overhead and profit. This shall not apply to extras performed for the owner. Backcharges shall be billed monthly and shall be promptly paid by the indebted party.
Scope of Work
9. If directed, by Lease, to perform work beyond the scope of this Agreement, the following unit prices are applicable. Classified backfill and unclassified backfill from borrow: $3.50 per c.y., based on the standard cross section measurement of material, in place, after compaction. Waste removal: $2.30 c.y., based on bank measurement, by the standard cross section method.
Judge Cranston awarded Holly the full amount of its backcharge, $4,202, which included a backfill cost of $3.50 per cubic yard as well as labor and equipment costs. He concluded:
Paragraph 9 of the scope of work provision of the subcontract establishes a unit price of $3.50 per cubic yard for classified backfill. Thus, the provision for $3.50 per cubic yard establishes an item of cost only and cannot reasonably be interpreted as covering all items of expense incident to the work involved in executing the change order. There is no evidence that the equipment, labor and materials used for the work described in Item 7 are unreasonable.
Lease maintains that the provision in paragraph 9 of a "unit price" of "$3.50 per [cubic yard]" to be paid where Lease requested Holly "to perform work beyond the scope of [the] agreement" included the costs of labor and equipment incurred in placing the material. We agree with this interpretation of "unit price" as used in paragraph 9. Paragraph 9 contains a provision for $2.30 per cubic yard for waste removal with reference to the same term, "unit price." Since there is no fill to be purchased in waste removal, this suggests that the term incorporates estimated labor and equipment costs incurred in removing or placing the specified unit. There is also evidence that in Holly's bid as well as in the usage of the trade such unit prices incorporate labor and equipment costs and profit.
This does not end the matter, however. The track widening entailed more than the placement of backfill; excavation and removal of material was necessary. It is possible that this should be considered waste removal under paragraph 9. If so, Holly would be entitled to compensation for the waste removal. However, it is also possible that the unit prices in paragraph 9 are not applicable because the process of widening required more precision than contemplated for the operations mentioned there. If so, paragraph (p) would govern and the actual cost of backfill rather than paragraph 9's unit price would have to be used. On remand the trial court should revise the award using either the method required by paragraph 9 or that required by paragraph (p) after conducting such supplemental proceedings as it finds appropriate.

C. Trial court's jurisdiction to decide a motion for reconsideration after notice of appeal has been filed

Lease filed on the same day a Motion for Reconsideration with the superior court and a Notice of Appeal to this court. On reconsideration, Judge Cranston partially granted Lease's motion. Holly argues on cross-appeal that the trial court was without authority to consider the motion for *719 reconsideration once a notice of appeal had been filed.
While an appeal is pending before this court, the superior court has jurisdiction to consider and to deny a Civil Rule 77(m) motion for reconsideration involving substantive legal error. Duriron Company v. Bakke, 431 P.2d 499, 500 n. 3 (Alaska 1967). Should the court determine that the motion should be granted, the movant should obtain a stay of the appellate proceedings and a remand for the stated purpose of granting the motion. Id. Failure to follow this procedure was harmless error in this case, however. Holly does not dispute the substance of the superior court's action on reconsideration or otherwise show that his rights were affected. Absent such evidence, we will not disturb those portions of the judgment modified on reconsideration. Alaska R.Civ.P. 61.

D. The trial court's denial of Holly's demand for a jury trial

Holly's complaint was filed with the superior court on November 29, 1979. It was not accompanied by a demand for a jury trial. Lease's answer and counterclaim were served on January 14, 1980, apparently beyond the twenty day limit imposed by Civil Rule 12(a).[5] Holly's reply to the counterclaim was mailed to Lease on February 21, 1980, again beyond the twenty day limit. Holly also mailed a demand for jury trial on February 21, 1980. It appears that neither party objected to the other's late service of pleadings. After a telephonic conference, a Trial Setting Conference Order was entered which stated that a jury trial was requested. The order was subsequently vacated due to discovery problems.
On November 13, 1983, after three years of inaction, Holly again filed a memorandum to set the case for trial, which stated that a jury trial was not demanded. Another telephonic pretrial conference was held; Holly admits that the attorneys briefly discussed the question of a jury trial in this conference. The pretrial order, filed on December 6, 1983, stated that the trial would be without a jury. An amended pretrial order also specified a non-jury trial. Trial was set for July 16, 1984. On July 13, 1984, one business day before the start of the trial, Holly requested a jury trial via telephonic conference. Judge Cranston denied Holly's request.
On cross-appeal Holly claims that he filed a timely demand for a jury trial and asks us to remand the case for a new trial to a jury. We find that by his conduct Holly waived his right to a jury trial.
Civil Rule 38(d) provides:
(d) Waiver. The failure of a party to serve a demand as required by this rule and to file it as required by Rule 5(d) constitutes a waiver by him of trial by jury. A demand for trial by jury made as herein provided may not be withdrawn without the consent of the parties. A party's consent to withdraw the jury trial demand may be implied by a failure to appear at trial.
Discussing the identical federal provision, Professors Wright and Miller have stated that
it is clear that the test of waiver that is applied to other constitutional rights, that there must have been "an intentional relinquishment or abandonment of a known right or privilege," is not applicable to the right to trial by jury.
.....
Waiver by failure to make a timely demand is complete even though it was inadvertent and unintended and regardless of the explanation or excuse... .
The right to jury trial may also be waived by conduct or agreement of the parties.
*720 9 C. Wright and A. Miller, Federal Practice and Procedure § 2321 at 101-02 (1971) (footnotes omitted) (hereinafter Wright and Miller).
Here, while Holly's initial demand for a jury trial may have been timely even though it accompanied an untimely responsive pleading,[6] Holly's post-demand conduct constituted a waiver of his right to a jury trial. Holly's second memorandum to set the case for trial stated that a jury trial was not requested. Holly's attorney admits that at the subsequent pretrial conference "the parties questioned whether the case was jury or non-jury." The pretrial order specified a non-jury trial. The pretrial order was amended to correct a clerical error and the amended order also specified a non-jury trial. Finally, and most importantly, Holly acquiesced to the order for seven months, up to the eve of the trial. Given Holly's indication that a jury trial was not requested, the subsequent open question as to whether there would be a jury trial, the pretrial order specifying a nonjury trial, and the acquiescence to the order, Holly waived his right to a jury trial. Cf. 9 Wright and Miller § 2321 n. 57 (Supp. 1985).
The pretrial order "control[led] the subsequent course of the action unless modified by the judge to prevent manifest injustice." Alaska R.Civ.P. 16(e). A further question is whether Judge Cranston abused his discretion in not modifying the order to allow a jury trial.
With regard to the federal analog to Civil Rule 16(e), Professors Wright and Miller have stated:
The court may permit the pretrial order to be amended when the danger of surprise or prejudice to the opposing party is small and a failure to amend might result in an injustice to the moving party. On the other hand, if the evidence or issue was within the knowledge of the party seeking modification at the time of the conference or if modification would place a great burden on the opposing party, then it may not be allowed.
6 Wright and Miller § 1527 at 611-12 (footnotes omitted). Holly was aware at the time of the pretrial conference that there was a question as to whether there would be a jury trial. Moreover, Judge Cranston found that "it would be prejudicial to [Lease] to now, at this late date [Friday], to require preparation for a jury trial to commence on Monday." Judge Cranston did not abuse his discretion in not allowing a jury trial.

E. Attorney's fees and costs

After ruling on Holly's motion for reconsideration the trial court concluded that
taken as a whole, considering the issues raised in plaintiff's complaint as well as defendant's counter claims, defendant was the prevailing party. Defendant secured the dismissal of the bulk of plaintiff's claims through summary judgment and further diminished plaintiff's sought recovery to a net total of $18,955.05 while at the same time succeeding on the principal claims asserted by it. The Court concludes that the prevailing party in all cases is not necessarily the party who is favored after the balancing of competing awards between the parties. Accordingly attorney's fees will be awarded to defendant.
On cross-appeal Holly challenges the trial court's finding that Lease was the prevailing party for purposes of its award of costs and attorney's fees. The determination of which party prevailed is a matter committed to the broad discretion of the trial court. Hayer v. National Bank of Alaska, 619 P.2d 474, 477 (Alaska 1980). The determination will be affirmed on appeal "unless it is shown that the court abused its discretion by issuing a decision which is arbitrary, capricious, manifestly unreasonable, or improperly motivated." City of Yakutat v. Ryman, 654 P.2d 785, *721 793 (Alaska 1982). The prevailing party is the one who prevails on the "main issue[s]," even though not to the extent of the original claim. Id. Holly does not show that the trial court's decision as to who prevailed on the main issues is manifestly unreasonable. We affirm the attorney's fees and costs award.
The judgment of the trial court is AFFIRMED in part, REVERSED in part, and REMANDED for further proceedings consistent with this opinion.
NOTES
[1]  Finegrading was described by witnesses as the careful grading of an area prior to pouring a concrete slab in order to bring the backfill to its final under-slab elevation to minimize the amount of concrete used.
[2]  The subcontract provides: "The CONTRACTOR agrees to pay to the SUBCONTRACTOR Ninety % of the SUBCONTRACTOR'S proportionate share of the progress payments allowed to the CONTRACT on account of the SUBCONTRACTOR'S work... ."
[3]  Professor Corbin, cited as authority for the general rule that the right to withhold progress payments is limited to circumstances which clearly warrant it, 564 P.2d at 43, does not discuss a notice requirement. See 3A Corbin on Contracts § 692 (1960). In United States v. Heyward-Robinson, 430 F.2d 1077, 1086 (2d Cir.1970), quoted in Arctic Contractors, the court of appeals affirmed without discussion a trial court instruction which included a notice requirement. The court stated that the instruction was "a substantially correct statement" of the circumstances under which the prime contractor could withhold progress payments to protect itself from liability to the subcontractor's suppliers, but cited no authority for a general requirement of notice prior to withholding progress payments.
[4]  Restatement (Second) of Contracts § 247 (1981) provides:

An obligor's acceptance of part of the obligee's performance, with knowledge or reason to know of the non-occurrence of a condition of the obligor's duty, operates as a promise to perform in spite of a subsequent non-occurrence of the condition ... to the extent that it justifies the obligee in believing that subsequent performances will be accepted in spite of that non-occurrence.
"The obligor can again make his duty subject to the condition by notifying the obligee of his intention to do so." Id. comment b.
[5]  Civil Rule 12(a) requires a non-governmental defendant to serve his answer within 20 days after the service of the summons and complaint and requires a non-governmental plaintiff to reply to a counterclaim in the answer within 20 days after service of the answer. The date of service of the complaint does not appear in the record, however, it appears the 20 day limit was exceeded.
[6]  See Hall v. Morozewych, 686 P.2d 708, 710-11 (Alaska 1984) (request for jury trial was timely within the explicit terms of Rule 38(b) where it accompanied formal answer, even though answer was untimely under Rule 12); but see Pankratz v. State, Dept. of Highways, 652 P.2d 68, 71 (Alaska 1982) (jury demand accompanying untimely reply to counterclaim is untimely).
