
846 So.2d 1096 (2002)
Cheryl Ann BURGOON
v.
Joseph Bernard BURGOON.
2010080.
Court of Civil Appeals of Alabama.
September 27, 2002.
Alan C. Livingston of Lee & McInish, P.C., Dothan, for appellant.
Submitted on appellant's brief only.
MURDOCK, Judge.
Cheryl Ann Burgoon ("the wife") and Joseph Bernard Burgoon ("the husband") were divorced by the Houston Circuit Court on August 30, 1997. In the divorce judgment, the trial court awarded possession of the marital home to the wife, with joint title remaining in both the wife and the husband until the parties' youngest child reached 19 years of age. The trial court further ordered the husband to make the payments on the loan secured by the first mortgage on the house and ordered the wife to make the payments on the loan secured by the second mortgage.
On July 17, 2001, the wife filed a petition to modify the divorce judgment. The wife stated that following the divorce, her child from a former marriage was murdered, causing her to suffer emotional and psychological trauma, and she alleged that as a result, she was unable to maintain employment and, subsequently, unable to make the payments on the second-mortgage loan as required by the divorce judgment. Consequently, that loan became delinquent, and the bank, on at least one occasion, debited the husband's account for the mortgage payment. The bank then began foreclosure proceedings. The wife contacted the husband, asking him to help her to refinance the second-mortgage loan at a lower interest rate so as to reduce the monthly payments. In order to refinance that loan, however, the wife needed the husband to redirect his mortgage payments directly to her.
On July 20, 2001, the trial court granted the wife pendente lite relief, which required the husband to make the mortgage payments directly to the wife and set a *1097 hearing on the wife's petition for modification. The husband subsequently filed a motion to dismiss, alleging, among other grounds, that the wife had "unclean hands." At the hearing, the trial judge heard arguments of counsel, but because the husband was unable to attend the hearing, no testimony was taken. On August 9, 2001, the trial court granted the wife's petition for modification and ordered the husband to make his mortgage payments directly to the wife. The husband filed a motion to alter, amend, or vacate the judgment; that motion was set for hearing on September 11, 2001. The wife filed a motion for rule nisi for the husband's failure to comply with the court's previous pendente lite order requiring him to make the mortgage payments directly to the wife.
At the hearing on the husband's postjudgment motion, the court heard arguments of counsel, but it took no testimony. On September 19, 2001, the court set aside the pendente lite order, reconsidered the husband's motion to dismiss, and then entered an order dismissing the wife's petition for modification and denying her motion for rule nisi "under the `clean hands' doctrine." In response, the wife filed a motion to alter, amend, or vacate the judgment, which the court denied on October 1, 2001, without conducting a hearing. The wife appealed. On January 15, 2002, the husband filed a motion seeking to have the appeal dismissed as moot.
The wife argues that the trial court erred in dismissing her petition on the basis that she had "unclean hands"; in failing to grant a hearing on her Rule 59(e), Ala. R. Civ. P., postjudgment motion; and in making findings of fact on a Rule 12(b), Ala. R. Civ. P., motion to dismiss. However, we must first address the issue whether this court should dismiss the appeal as moot.
The husband claims that on January 10, 2002, the trial court, with the consent of the parties, set aside its October 1, 2001, order, and scheduled a new hearing on the wife's petition for modification. This court has stated that "a trial court generally loses jurisdiction to amend its judgment 30 days after the entry of judgment." Henderson v. Koveleski, 717 So.2d 803, 806 (Ala.Civ.App.1998). However, "a trial court retains the power to correct sua sponte any error in its judgment that comes to its attention during the pendency of a party's Rule 59(e)[, Ala. R. Civ. P.,] motion to alter, amend, or vacate the judgment, regardless of whether the error was alleged." Id. In this case, there was no Rule 59(e) motion pending before the court. The trial court had denied the wife's Rule 59(e) motion on October 1, 2001. As a result, the trial court lost jurisdiction to amend its judgment after October 31, 2001. Therefore, we conclude that the wife's appeal is not moot.
The wife argues that the trial court erred in finding that the wife had "unclean hands" and in granting the husband's motion to dismiss. In Lowe v. Lowe, 466 So.2d 969 (Ala.Civ.App.1985), this court concluded that, unless otherwise shown on the face of the petition, the determination of whether to apply the "clean-hands doctrine" is not a determination that can be made based on the pleadings alone. Id. at 970-71. See also King v. King, 636 So.2d 1249, 1252 (Ala.Civ.App.1994).
In Lowe, the husband filed a petition to modify the divorce judgment, alleging that his income had been so materially reduced that he was financially unable to make the court-ordered monthly alimony payments. 466 So.2d at 969. The wife's motion to dismiss averred that the husband had "unclean hands" because the alimony payments were in arrears. Id. The trial court *1098 granted the wife's motion to dismiss without conducting an evidentiary hearing.[1]
This court reversed the trial court's judgment, holding that the face of the husband's modification petition did not indicate that the husband had unclean hands and, therefore, that the clean-hands doctrine should have been raised by an affirmative defense pursuant to Rule 8(c), Ala. R. Civ. P., rather than in the wife's motion to dismiss. Id. at 970. The court explained that unless a summary judgment could properly be granted on the clean-hands issue, that issue would be an evidentiary trial issue. Id. The Lowe court concluded that "there was no supportive evidence of a lack of clean hands on [the husband's] part," and the facts set forth in the judgment were "premature findings of fact made without evidence thereon." Id.
Based on this court's decision in Lowe, we conclude that the trial court erred in dismissing the wife's petition for modification, without the benefit of testimony, based on the clean-hands doctrine. Accordingly, the judgment of the trial court is reversed, and the case is remanded for further proceedings consistent with this opinion.
Given our decision on the foregoing issue, we pretermit discussion of the wife's remaining arguments.
REVERSED AND REMANDED.
YATES, P.J., and THOMPSON and PITTMAN, JJ., concur.
NOTES
[1]  The trial court in Lowe actually conceded that "`it would be necessary that evidence be heard in order for the Court to make the determination that the "clean hands" doctrine should apply,'" but proceeded to base its decision on evidence that it had heard in previous proceedings. Lowe, 466 So.2d at 969-70.
