
181 S.W.3d 172 (2005)
Corrina Ivy ANDERSON, Appellant,
v.
Phyllis JACKSON and Bennie Jackson, Deceased, Respondents.
No. 26569.
Missouri Court of Appeals, Southern District, Division One.
November 4, 2005.
Motion for Rehearing or Transfer Denied November 28, 2005.
Application for Transfer Denied January 31, 2006.
*174 Dale E. Nunnery, Swindle and Nunnery, P.C., Doniphan, for appellant.
Barbara A. Godley, Welman, Hively & Godley, LLP, Kennett, for respondents.
Motion for Rehearing or Transfer to Supreme Court Denied November 28, 2005.
JOHN E. PARRISH, Judge.
This is an appeal by Corrina (Ivy) Anderson (mother) of a judgment denying her two-count petition to modify a prior custody order (Count I) and for writ of habeas corpus (Count II). This court affirms.
Phyllis Jackson (respondent) and Bennie Jackson, now deceased, were granted legal custody of mother's children, Cheyenne Lavon Ivy and Cody Keith Ivy, by a judgment of the Circuit Court of Dunklin County, Missouri, entered February 4, 2003. Joint physical custody of the children was awarded to mother, respondent, and Bennie Jackson. Respondent and Bennie Jackson are paternal grandparents of the children.[1]
The marriage of mother and David Ivy (father) was dissolved May 10, 2001. Father was awarded custody of the children.[2] Father died October 29, 2001. The children were placed in the custody of respondent and Bennie Jackson by a juvenile court order dated November 7, 2001. The petition in the juvenile court was later dismissed.
Mother sought custody of the children in May 2002 by filing a petition for habeas corpus that was tried and denied. Judgment was entered in that case February 4, 2003. The judgment included the custody order that mother sought to modify by the action that produced this appeal.
The amended petition on which the case that is the subject of this appeal was tried was filed December 5, 2003. It alleged in Count I that there had been a substantial change in circumstances since the February 4, 2003, custody award was entered. The change in circumstances mother alleged included that Bennie Jackson was deceased; that mother had remarried and established a stable home in the State of Colorado. She alleged it would be in the best interests of the children for their physical custody and legal custody to be placed with her.
Count II of mother's amended petition was an action for habeas corpus. Mother asserted that respondent was restraining her children; that the February 2003 judgment that established custody of the children was "without force and effect"; that the trial court had lacked subject matter jurisdiction to award custody to persons other than her, as the children's natural parent.
The trial court denied mother's motion to modify and denied her petition for habeas corpus. The judgment declared that the best interests of the children would "be best served by leaving unmodified the Judgment entered ... February 4, 2003, vesting the children's legal custody in Respondent... and their joint physical custody in [mother] and [respondent]." The trial court further found that mother was *175 not unfit, unsuitable or unable as a parent, but found the welfare of the children required, and their best interests required, that they remain in the custody of respondent "in order to provide them a stable environment."
Mother's Points I and II are directed to the trial court's denial of Count II of the amended petition, the request for habeas corpus relief. Generally, an appeal does not lie from the denial of a petition for habeas corpus. E.W. v. K.D.M., 490 S.W.2d 64, 67-68 (Mo. banc 1973); Hubert v. Purkett, 165 S.W.3d 585 (Mo.App.2005). A petitioner whose petition for habeas corpus is denied may file a new petition with a higher court. Id.
Section 512.025[3] provides an exception to the general rule. It allows appeals from decisions denying relief in instances involving custody of minor children when there has been no prior court order determining custody. Section 512.025 appears to be not applicable in this case due to the existence of the February 4, 2003, judgment that mother sought to modify by Count I of her amended petition. Point I, however, challenges the validity of the February 4 judgment.
Point I asserts that the trial court did not have jurisdiction to enter the February 4, 2003, judgment because the circuit court "lost jurisdiction to award custody of the minor children to any third party, when the children's natural father... died." If the trial court did not have jurisdiction to enter the February 4, 2003, judgment, the judgment would be void and of no effect. Doss v. Howell-Oregon Elec. Co-op., Inc., 158 S.W.3d 778, 782 (Mo.App. 2005). If mother's assertions in Point I were correct, § 512.025 would permit her to appeal the denial of the petition for writ of habeas corpus that was set forth in Count II of her amended petition.
The award of custody to the children's grandparents by the February 4, 2003, judgment was not founded on unfitness of mother, but was a determination that the best interests of the children required granting of legal custody to the grandparents and joint physical custody to the grandparents and mother. "[I]n all such proceedings, the welfare of the child is and must be the prime and overriding consideration and the rights and claims of the parents are and must be of secondary importance." Matter of W ___ K___ M ___, 537 S.W.2d 183, 185 (Mo.App.1976). "[T]he presumption which favors vesting of custody in the natural parent must fall whenever the best interests of the child, for some special or extraordinary reason or circumstance, mandate that custody be vested in third persons, regardless of whether the evidence establishes the unfitness or incompetence of the natural parent." In Interest of K.K.M., 647 S.W.2d 886, 890 (Mo.App.1983). The trial court had authority to make the determination set forth in the February 4, 2003, judgment. That determination was made in a habeas corpus action. Father's death had no bearing on the trial court's authority to determine custody in a habeas corpus proceeding. Point I is denied.
Point II is also directed to the petition for habeas corpus. Point II is moot in that the February 4, 2003, custody order may be addressed by motion to modify pursuant to § 512.025. It is not subject to habeas corpus review. Further, Point II mischaracterizes the trial court's actions with respect to mother's Count II. Point II asserts that the application for habeas corpus relief in Count II was "dismissed." The petition for habeas corpus was denied. *176 Respondent filed a motion to dismiss Point II on the basis of that mischaracterization. That motion was taken with the case. It is, likewise, moot.
Point III contends the trial court erred in denying mother's motion to modify the February 4, 2003, custody order. Mother argues that she "demonstrated a substantial change in circumstances regarding the third party custodians and a modification of the judgment awarding custody to Respondents was necessary to serve the best interests of the minor children in that Respondent Bennie Jackson died and [mother] abated the cause of placing her children with Respondents by being able to provide the children with a stable home environment."
This court will affirm the modification judgment unless it is not supported by the evidence, is against the weight of the evidence, or erroneously declares or applies the law. Suffian v. Usher, 19 S.W.3d 130, 135-36 (Mo. banc 2000). Greater deference is afforded the judgment of the trial court in a custody matter than in other matters. Id. at 136.
The trial court denied mother's request to award her sole physical custody and legal custody of the children. It left joint physical custody with mother and respondent and legal custody of the children with respondent. The trial court concluded "that the best interest and welfare of the minor children, .. . will presently be best served by leaving unmodified the Judgment entered herein February 4, 2003, vesting the children's legal custody in [respondent] and their joint physical custody in [mother] and [respondent]."
Mother and respondent agreed that there had been a substantial change in the circumstances of the children and respondent in view of the death of Bennie Jackson. Mother argued that changes in her lifestyle  remarriage, a home in Colorado, benefits for the children through her husband  warranted the modification of the prior custody order; that change of custody would be in the children's best interests.
The trial court found that leaving legal custody of the children with respondent and joint physical custody with respondent and mother was in the children's best interests. The children had lived in Dunklin County, Missouri, with father, the grandparents, or respondent since mother and father's separation. Father was awarded custody of the children in the decree that dissolved his and mother's marriage. Father and the children were living with respondent and Bennie Jackson when father died. The children had not been in mother's custody for nearly six and one-half years.
Extended family members live near respondents and have good relationships with the children. The children go to school and are involved in extracurricular activities in Dunklin County. Mother had not attended any of the children's extracurricular or school activities, with the exception of one soccer game. Mother does not provide financial support for the children other than medical insurance provided by her present husband's service with the U.S. Army.
Mother resides in Colorado. Mother intended to move the children to Colorado if custody was modified. Mother had not consistently exercised her visitation or temporary custody rights with the children, even when she resided near them.
Cody had been hospitalized on one occasion following father's death. He was in a hospital for three days. At that time mother was staying at her parent's home in Pocahontas, Arkansas. The only time she spent with Cody during his hospitalization was approximately one and one-half *177 hours the last day he was hospitalized. Respondent had spent nights at the hospital with Cody while Cheyenne stayed with an uncle and aunt. Mother had not offered to help with the care of either child.
Respondent has provided daily care for the children during the majority of their lifetime. Respondent cared for them during mother and father's separation and following dissolution of their marriage. She provided their care after the death of father and after the death of Bennie Jackson. She quit working outside of the home in order to care for the children.
"In considering the best interest of the child on motions for change of custody, the trial court is vested with wide discretion. Nichols v. Beran, 980 S.W.2d 342, 345 (Mo.App. W.D.1998). The reviewing court should defer to the findings of the trial court unless they are in conflict with a clear preponderance of the evidence and they disclose an abuse of discretion. Id." McCubbin v. Taylor, 5 S.W.3d 202, 207 (Mo.App.1999).
This court finds no abuse of discretion by the trial court in its determination that it was in the best interests of the children to leave legal custody with respondent and joint physical custody with mother and respondent. That determination is not in conflict with a clear preponderance of the evidence. Point III is denied. The judgment is affirmed.
PREWITT, P.J., and RAHMEYER, J., concur.
NOTES
[1]  Bennie Jackson died May 28, 2003.
[2]  Cheyenne Lavon Ivy was born May 24, 1996. Cody Keith Ivy was born August 23, 1997.
[3]  References to statutes are to RSMo 2000.
