
895 N.E.2d 677 (2008)
WASHINGTON MUTUAL BANK, F.A., f/k/a Washington Mutual Home Loans, Inc., as Successor in Interest to Homeside Lending, Inc., Plaintiff-Appellee,
v.
ARCHER BANK, Defendant-Appellant.
(Kaminco, Inc., f/k/a Insty Prints of Joliet, and David Kaminskas, Defendants-Appellees;
James J. Kelly III, Lorinda A. Kelly, Seven Bridges Estates Homeowners' Association, Unknown Owners, and Nonrecord Claimants, Defendants).
No. 2-07-0074.
Appellate Court of Illinois, Second District.
September 15, 2008.
*678 Nicholas Geroulis, Lance Johnson, Martin & Karcazes, Ltd., Chicago, IL, for Appellant.
John C. Renzi, June, Prodehl & Renzi LLC, Joliet, IL, for Appellee.
JUSTICE O'MALLEY delivered the opinion of the court:
Archer Bank, a lienholder-defendant in a foreclosure action brought by Washington Mutual Bank, F.A. (WMB), seeks reversal of an order dismissing its request that the trial court vacate an order defaulting it. Archer made its request under section 2-1401 of the Code of Civil Procedure (Code) (735 ILCS 5/2-1401 (West 2006)) and, in the alternative, under section 2-1301(e) of the Code (735 ILCS 5/2-1301(e) (West 2006)). The trial court held that the request was untimely as a motion under section 2-1301(e) and insufficient as a petition under section 2-1401. On appeal Archer argues only that the trial court erred in finding the request insufficient as a section 2-1401 petition. If we view this appeal as one from the dismissal of a section 2-1401 petition, it is too late. However, it is timely as one from the order ending the underlying foreclosure case. Looking beyond Archer's waiver of the matter, we hold that the trial court erred in ruling that the request to vacate the default was untimely under section 2-1301(e). We therefore vacate the ruling and the final judgment in the foreclosure case, and we remand the matter for the court to give proper consideration to Archer's motion.
On June 1, 2005, WMB filed a complaint to foreclose the first mortgage on a Woodridge residential property. It named as defendants the property owners, James J. Kelly III and Lorinda A. Kelly. It also named Kaminco, Inc., and its owner, David Kaminskas (collectively, Kaminco), Archer, Seven Bridges Estates Homeowners' Association, and, per standard practice, unknown owners and nonrecord claimants. WMB alleged that Archer held two mortgages, which it had recorded on June 7, 1999, and July 9, 2002, and that Kaminco held a lien, based on its recording of a memorandum of judgment against James Kelly on March 5, 2003.
Kaminco appeared promptly and answered, agreeing that it had a lien but stating lack of knowledge and demanding proof of (among other things) Archer's liens. It did not file an affidavit of its lack of knowledge. As of August 15, 2005, the Kellys, Archer, and the homeowners' association *679 had not appeared, and the court found them in default that day. Also on the 15th, it entered summary judgment against Kaminco and a judgment of foreclosure. The foreclosure judgment recognized Kaminco's lien, with a balance of $133,345.73, as subordinate to that of WMB, but did not recognize any other subordinate liens. The order set a sheriff's sale for January 12, 2006. The sale did not go forward on that day; Kaminco later stated that this cancellation was at Archer's request.
On February 7, 2006, Archer filed a "Motion to Vacate any Defaults and * * * for Entry of a Judgment in Favor of Archer Bank." In the introduction to the filing, it cited section 2-1401 of the Code, but later cited both sections 2-1301(e) and 2-1401 as the source of the court's authority to vacate the default. It asked that the court vacate the default against it so that it could prove the existence of its liens for $218,488.06 and those liens' priority. Archer asserted that the existence of its liens gave it what amounted to a meritorious defense.
Kaminco moved under section 2-615 of the Code (735 ILCS 5/2-615 (West 2006)) to dismiss the request, arguing that it was too late as a section 2-1301(e) motion and that, as a section 2-1401 petition, it failed to allege due diligence and a meritorious defense. At a hearing on March 14, 2006, Archer argued that, because the final order in a foreclosure action is the order approving the distribution of sale proceeds, section 2-1401 did not apply. The court agreed with Kaminco that the request was too late as a section 2-1301(e) motion and that, under section 2-1401, Archer had failed to state a cause of action because it had not alleged that it had been diligent in defending itself and in bringing its petition. The court therefore ruled that it had no option but to dismiss the filing. However, the order stated that "[t]his order is without prejudice to Defendant Archer Bank or its right to any surplus that may exist after payments to creditors who have exercised their rights have been duly paid from the proceeds of [the] Sheriff Sale." The court did not explain how Archer could retain the right to seek funds from the sale.
The sheriff's sale took place on April 11, 2006. Archer was the winning bidder, bidding $447,000; this bid gave the court approximately $257,000 to distribute after the satisfaction of WMB's lien.
On April 12, 2006, Archer filed, pursuant to sections 2-1301(e) and 2-1401, an "[a]mended" motion to vacate the default. It asked the court to enter judgment against the Kellys for $218,488.06 and to find that a lien in that amount survived "for purposes of Archer Bank's Petition for the Surplus of the Sale."
On May 5, 2006, Lorinda Kelly, who had filed an appearance on April 19, 2006, filed an objection to approval of the report of sale. She asked that the court rule that Kaminco's lien interest attached only to James Kelly's half interest in the property; she and James were joint tenants. She further asked that the court reconsider its treatment of Kaminco's lien as "superior to ARCHER's" or "discharge[]" Archer's claim.
On May 26, 2006, the court approved the report of sale. At that time, it allowed Archer to prove the existence of its liens, "but without any effect on [the] prior order of 3/14/06, wherein [the] interest of [Kaminco] was found superior to [that of] ARCHER BANK." Archer then filed an affidavit averring that the balance on its liens was $257,478.85.
On September 27, 2006, the court ordered that Kaminco receive $121,239.42, reflecting its lien on James Kelly's share of *680 the property minus his homestead exemption. It ordered that Archer receive the remaining surplus, except that, because of Archer's "waiver," the court ruled that Lorinda Kelly was entitled to her homestead exemption on the property. On October 27, 2006, Archer filed a motion to reconsider. It argued that the only basis for the court's subordination of Archer's liens was as a form of punishment for Archer's failure to appear. On December 14, 2006, the court denied the motion to reconsider. On January 12, 2007, Archer filed a notice of appeal stating that it was challenging the order of September 27, 2006 (the distribution order), and the order of December 14, 2006 (the order denying its motion to reconsider). On appeal, it challenges the court's dismissal of its February 7, 2006, "Motion to Vacate any Defaults and * * * for Entry of a Judgment in favor of Archer Bank" in its section 2-1401 aspect.
On appeal, Archer argues only that the court erred in dismissing Archer's section 2-1401 petition when it ruled that it could not grant it absent evidence of Archer's diligence.
The way Archer initially set out its claim of error presented us with a jurisdictional problem. Although none of the parties to this appeal raised the issue of our jurisdiction, a reviewing court has a duty to consider sua sponte whether it has jurisdiction. In re Marriage of Link, 362 Ill.App.3d 191, 192, 298 Ill.Dec. 355, 839 N.E.2d 678 (2005). We have no doubt that Archer's notice of appeal gives us jurisdiction to review the outcome of the foreclosure case. But Archer's brief complains only of the trial court's dismissal of Archer's request to vacate the default in that request's aspect as a section 2-1401 petition. Under Supreme Court Rule 304(b)(3) (210 Ill.2d R. 304(b)(3)), an order resolving a section 2-1401 petition is immediately appealable. When Rule 304(b) makes an order immediately appealable, that appeal is not electiveany claim of error is lost if not raised then. See In re Estate of Thorp, 282 Ill.App.3d 612, 616, 218 Ill.Dec. 416, 669 N.E.2d 359 (1996). Indeed, because a section 2-1401 petition begins a separate action, (Sarkissian v. Chicago Board of Education, 201 Ill.2d 95, 102, 267 Ill.Dec. 58, 776 N.E.2d 195 (2002)), the resolution of the petition ends the entire action, so no other time to appeal could exist.
To the extent that this appeal is solely one challenging the dismissal of a section 2-1401 petition, it is untimely. The court dismissed Archer's request to vacate the default on March 14, 2006, but Archer did not appeal until January 12, 2007, 10 months later.
However, as to the underlying foreclosure action, this court does have jurisdiction to review the trial court's orders of September 27, 2006, and December 14, 2006, and all earlier nonfinal orders that produced the final judgment embodied in those orders (see In re D.R., 354 Ill.App.3d 468, 471, 290 Ill.Dec. 128, 820 N.E.2d 1195 (2004)). The denial of Archer's request, in its aspect as a section 2-1301(e) motion, is one such order, and we thus have jurisdiction to consider the denial. But because Archer's appellate brief addresses the request only as a section 2-1401 petition, it has waived all other claims of error. See 210 Ill.2d R. 341(h)(7).
We, of course, can look beyond a waiver, in the interests of justice or to maintain a uniform body of precedent. See In re Estate of Funk, 221 Ill.2d 30, 97, 302 Ill.Dec. 574, 849 N.E.2d 366 (2006). We choose to look beyond the waiver here. Having decided that, jurisdictionally, this appeal is one of a section 2-1301(e) motion, we would only sow confusion if we then evaluated it as if it were one of a *681 section 21401 petition. Further, we note ongoing confusion among practitioners and trial courts about the uses of sections 2 1301(e) and 21401. We hope to alleviate some of that confusion. To avoid any injustice that might result from our reframing of the issue, we asked the parties to give us supplemental briefs addressing whether the filing was properly one under section 21301(e) and what effect considering it as such would have on the appeal. The parties now agree that, under the holding in Kral v. Fredhill Press Co., 304 Ill.App.3d 988, 237 Ill.Dec. 555, 709 N.E.2d 1268 (1999), the trial court should have treated the filing as one under section 2 1301(e).
We hold that the trial court erred when it found that Archer's request to vacate was untimely as a motion under section 21301(e). Section 21301(e) states that a "[trial] court may in its discretion, before final order or judgment, set aside any default, and may on motion filed within 30 days after entry thereof set aside any final order or judgment upon any terms and conditions that shall be reasonable." 735 ILCS 5/21301(e) (West 2006). A judgment or order is "final" for the purposes of section 21301(e) only if it is final and appealable. In Kral, a First District panel explained why this is so. At the risk of oversimplification, we summarize that reasoning here. Supreme Court Rule 304(a) states that, absent a finding by the trial court that allows enforcement or appeal of an appropriate judgment, "any judgment that adjudicates fewer than all the claims or the rights and liabilities of fewer than all the parties * * * is subject to revision at any time before the entry of a judgment adjudicating all the claims, rights, and liabilities of all the parties." 210 Ill.2d R. 304(a). (Conversely, judgments are enforceable or appealable only if the trial court cannot modify them under this rule-either because the court has entered a finding of enforceability or appealability or because the judgment resolves all matters.) Another way of putting this is that the rule contemplates the trial court's modifying its orders while it retains jurisdiction to do so. Section 21301(e), which is the modern replacement for the old rule that a court could modify its own orders any time within the court's term, is the mechanism for implementing the modifications contemplated by Rule 304(a), and thus it needs to be available while the court retains jurisdiction to modify its orders. (Section 21401, by contrast, is a mechanism for revesting jurisdiction in the trial court after it has lapsed. The implication is that section 21401 has no proper function while the trial court retains jurisdiction to modify its orders.) We find this reasoning persuasive and therefore follow Kral.
Illinois law is clear that the judgment in a foreclosure case that ends a foreclosure caseand thus ends the free modifiability of preceding orders under Rule 304(a)is the approval of the sale and the distribution of the proceeds. In re Marriage of Verdung, 126 Ill.2d 542, 555, 129 Ill.Dec. 53, 535 N.E.2d 818 (1989); In re Hodges, 350 B.R. 796, 802 nn. 8-9 (Bankr.N.D.Ill.2006).[1] Therefore, under Rule 304(a), a court can modify any judgment in a foreclosure case (unless it has issued a proper Rule 304(a) finding with respect to that judgment) until it enters the order approving the sale and distributing the proceeds. We find no Rule 304(a) finding applying to any order in the record. Under the rule in Kral, therefore, a *682 section 21301(e) motion requesting vacation of the default would have been timely anytime until 30 days after the order distributing the proceeds. Archer made its request to vacate the default well before the court entered the distribution order, so the request was timely as a section 2 1301(e) motion.
Because the trial court did not recognize that it should evaluate Archer's filing under the standards for a section 21301(e) motion, we must remand the matter for reconsideration under those standards. See In re Adoption of D., 317 Ill.App.3d 155, 161-62, 250 Ill.Dec. 648, 739 N.E.2d 109 (2000) (holding that where the trial court improperly used section 21401 standards rather than section 21301(e) standards, the matter had to be remanded to allow the court to properly exercise its discretion).
That the court granted Archer some relief (by allowing it to prove the existence of its liens) does not change the result here. Had the court understood that it could act only under section 21301(e), it might have granted different relief. Further, we question whether the relief the court granted, effectively switching the priorities of Archer's and Kaminco's liens, was appropriate section 21301(e) relief. Even had the priority switch been a choice crafted by the court under section 21301(e), it would have been a bad choice. First, the conditions of setting aside a default generally put the parties in the places they would have been had the defaulting party acted in time; that typically means paying fees and expenses associated with the delay. See, e.g., Ward v. Rosenfeld, 204 Ill.App.3d 908, 913-14, 150 Ill.Dec. 144, 562 N.E.2d 674 (1990) (an example of such condition-setting). The priority switch does not return the parties to an earlier condition and so would be an unusual choice for relief under section 21301(e). Second, switching the priorities of the liens may have disadvantaged Lorinda in a way that the foreclosure alone did not, as the switch increased the likelihood that Lorinda would face a deficiency judgment. That effect on a third party made the switch a poor choice for achieving equity between Archer and Kaminco.
Kaminco argues that Archer sold the Kellys' property at a good profit and therefore does not need any other relief. Nothing showing Archer's profit is part of the record on appeal, so Kaminco's argument is improper. Allstate Insurance Co. v. Kovar, 363 Ill.App.3d 493, 499, 299 Ill. Dec. 916, 842 N.E.2d 1268 (2006). This line of argument does, however, raise a legitimate issue, namely which facts the trial court should consider on remand. Should it consider only what should have happened on March 14, 2006, or are intervening events a legitimate consideration? Justice is the driving force in the decision on a section 21301(e) motion. See Venzor v. Carmen's Pizza Corp., 235 Ill. App.3d 1053, 1056-57, 176 Ill.Dec. 774, 602 N.E.2d 81 (1992) (a reviewing court should reverse the denial of a section 21301(e) motion when there has been a denial of substantial justice). What the court would have originally decided under the correct standard is the obvious baseline for the trial court's decision; if circumstances are such that the court can simply undo any mistake it has made, that is the best solution. However, if parties have shifted positions in reliance on the court's decision, a simple attempt to undo might result in injustice. The trial court can treat that kind of reliance as a factorrecognizing, though, that Archer made clear that it intended to challenge the court's decision.
For the reasons stated, we vacate the denial of Archer's section 21301(e) motion and the order distributing the proceeds of the sheriff's sale, and we remand *683 the matter to the trial court for further proceedings consistent with this opinion.
Vacated and remanded.
ZENOFF, PJ., and JORGENSEN, J., concur.
NOTES
[1]  The judgment of foreclosure itself is final, in the sense that a party can appeal it with a Rule 304(a) finding. Verdung, 126 Ill.2d at 555, 129 Ill.Dec. 53, 535 N.E.2d 818; Hodges, 350 B.R. at 802 nn. 8-9.
