delivered the opinion of the court:
The petitioner, Erika B. Breyley (Erika), appeals from an order of the trial court which vacated the child custody and child support provisions of a judgment of dissolution of marriage. The judgment dissolved her marriage to the respondent, James K. Breyley (James). Erika also appeals from an order which determined that the issue of child custody would be decided in Illinois. We granted Erika’s petition for leave to appeal pursuant to Supreme Court Rule 306 (134 Ill. 2d R. 306).
Erika raises three issues on appeal: (1) whether the trial court abused its discretion in granting James’ petition to vacate portions of the judgment of dissolution pursuant to section 2 — 1401 of the Code of Civil Procedure (Code) (Ill. Rev. Stat. 1991, ch. 110, par. 2—1401); (2) whether the circuit court of Illinois has jurisdiction to decide the custody issue; and (3) whether the trial court abused its discretion in declining to transfer the cause to Texas based upon forum non conveniens. We affirm.
The parties were married in Arizona in December 1989. They moved to New Jersey in April 1990. The only child of the parties, James K. Breyley IV, was born in New Jersey on November 26, 1990. Erika and the child moved to Illinois in February 1991. James moved to Illinois in March or April 1991 following his discharge from the military service. The parties then purchased a home in Macomb, Illinois.
Erika filed her petition for dissolution of marriage on December 18, 1991. A judgment of dissolution, which incorporated a written marital settlement agreement, was entered on December 30, 1991. The agreement provided that the parties would have joint custody of the child pursuant to a joint parenting agreement. The joint parenting agreement stated Erika would have actual physical custody and James would have reasonable visitation. The agreement also provided that James would pay 15% of his net take-home pay as child support. According to a document filed with the court the same day, Erika was represented by an attorney, while James was not represented by counsel.
Subsequent to the entry of the judgment, James retained counsel. Through his counsel, James filed a petition pursuant to section 2— 1401 of the Code (Ill. Rev. Stat. 1991, ch. 110, par. 2—1401) on March 12, 1992. He sought to vacate those portions of the judgment of dissolution related to child custody and child support. In his supporting affidavit, James stated that he and Erika met with an attorney in December 1991 regarding a simple and inexpensive dissolution of marriage. He and Erika told the attorney they wanted joint custody of the child and agreed that each party would have the child approximately one-half of the time. James stated that the attorney did not advise him regarding the legal consequences of a written judgment stating that Erika had physical custody of the child. In fact, the attorney told them that either of them could go into court and change the custody arrangement if they were not satisfied. The attorney did not explain the burden of proof which must be met to change a custody order within two years of the original judgment.
James also stated that, after the judgment was entered, he had physical custody of the child until January 20, 1992. At that time, he delivered the child to Erika’s mother in Texas where Erika was attending school. Erika thereafter refused to allow him visitation with the child. James additionally stated the parties had agreed that his obligation to pay child support would be deferred until he completed his college education.
Erika, through new counsel, filed a motion to dismiss James’ petition. Later, on June 8, 1992, she filed a petition for leave to remove the child from the State. She stated in the petition that she moved to Texas immediately after the entry of the judgment and desired to make a permanent home in Texas. James’ response to this petition stated that he took the child to Texas in January pursuant to an agreement with Erika. The agreement was that Erika would be in Texas only until March 1992 when she would finish an emergency medical technician (EMT) training program.
On June 26, 1992, Erika filed her response to James’ section 2— 1401 petition. She attached an “opposing affidavit.” She denied agreeing to allow James to have physical custody of their child approximately one-half of the time. However, she also admitted:
“[The attorney] explained to [Erika] and [James] the joint custody arrangement and the consequences of [Erika] having physical custody of the child and although he said that if [Erika] and [James] failed to agree, they could go to court to have their differences resolved, he never discussed the requirement of showing endangerment of the child in order to modify the custody order within the first two years.”
In an additional verified pleading, Erika admitted she agreed to a deferment of child support while James completed college. She stated, however, that she was later informed that such an agreement was against public policy and therefore unenforceable.
A hearing was held on July 1, 1992. Following argument by counsel for both parties, the trial court denied Erika’s motion to dismiss James’ section 2 — 1401 petition. The court then granted James’ petition. The court found that an evidentiary hearing was not necessary because of the admissions made by Erika.
A formal written order was subsequently entered on July 14, 1992. The order stated that those portions of the judgment related to child custody and child support were vacated pursuant to James’ motion. The trial court’s order also stated that, by agreement of the parties and without prejudice to either party, Erika was to have temporary custody of the child in Texas. James was granted visitation with the child in Illinois. Trial on the issues of custody and child support was set for October 1992.
On August 12, 1992, Erika filed a motion seeking a determination of the trial court’s jurisdiction to decide the custody issue and, in the alternative, a forum non conveniens motion seeking transfer of the cause to Texas. The trial court denied the motions in a written order dated October 28, 1992. The court found that the child custody determination should be made in Illinois. The order specifically noted that permitting Erika to transfer the cause to Texas would be contrary to one of the purposes of the Uniform Child Custody Jurisdiction Act (Act) (Ill. Rev. Stat. 1991, ch. 40, par. 2101 et seq.), since the child was taken to Texas without the permission of the Hlinois court.
On appeal, Erika first argues that the trial court erred in granting James’ section 2 — 1401 petition. She initially contends the petition was inadequate to meet the requirements of section 2 — 1401. We disagree.
Section 2—1401 of the Code provides a comprehensive statutory procedure by which final orders and judgments may be vacated more than 30 days after their entry. (Ill. Rev. Stat. 1991, ch. 110, par. 2—1401; Smith v. Airoom, Inc. (1986), 114 Ill. 2d 209, 220, 499 N.E.2d 1381, 1386.) The purpose of a section 2 — 1401 petition “is to bring before the court matters of fact which were unknown at the time the judgment was entered, and if known, would have affected or altered the judgment.” (In re Marriage of Hoppe (1991), 220 Ill. App. 3d 271, 282, 580 N.E.2d 1186, 1192-93.) A petition pursuant to section 2— 1401 invokes the equitable powers of the court as justice and fairness require. (In re Marriage of Johnson (1992), 237 Ill. App. 3d 381, 390, 604 N.E.2d 378, 385.) To be entitled to relief under section 2 — 1401, a petitioner must affirmatively set forth specific factual allegations supporting: (1) the existence of a meritorious claim or defense; (2) due diligence in presenting this claim or defense to the circuit court in the original action; and (3) due diligence in filing the section 2 — 1401 petition for relief. (Airoom, 114 Ill. 2d at 220-21, 499 N.E.2d at 1386.) A section 2 — 1401 petition may be dismissed if it fails to state sufficient facts to warrant relief. In re Marriage of Lindjord (1992), 234 Ill. App. 3d 319, 326, 600 N.E.2d 431, 436.
We conclude that the facts alleged in James’ petition were sufficient to warrant relief pursuant to section 2 — 1401. James’ petition alleged sufficient facts to show that: (1) the written marital settlement agreement did not reflect the actual agreement of the parties; and (2) the parties were misinformed about the binding legal effect of the written agreement.
“A mutual mistake of fact which was unknown to the court at the time of judgment and which would have prevented the entry of such judgment is a proper ground for relief under section 2 — 1401.” (Galligan v. Washington (1987), 163 Ill. App. 3d 701, 708, 516 N.E.2d 894, 898.) A mutual mistake of fact exists when the contract has been written in terms which violate the understanding of both parties. (In re Marriage of Osborn (1990), 206 Ill. App. 3d 588, 598, 564 N.E.2d 1325, 1331; see also Johnson, 237 Ill. App. 3d at 394, 604 N.E.2d at 388.) Relief is therefore available under section 2 — 1401 if a judgment of dissolution incorporating a written agreement fails to express the real intention of the parties because of a mutual mistake. See Johnson, 237 Ill. App. 3d at 394, 604 N.E.2d at 387-88; In re Marriage of Shelton (1984), 127 Ill. App. 3d 775, 781, 469 N.E.2d 618, 623.
Here, we find James’ petition alleged sufficient facts to show that the written marital settlement agreement did not reflect the actual agreement of the parties regarding child support and child custody because of a mutual mistake. The petition further alleged sufficient facts to show that James’ failure to exercise due diligence at the time the judgment was entered was excused because of the misinformation he received from the attorney. In addition, the petition was adequate to support the existence of due diligence in the filing of the petition since it was filed less than three months following the entry of the judgment. (See, e.g., Chastain v. Chastain (1986), 149 Ill. App. 3d 579, 582, 500 N.E.2d 998, 1000.) We conclude that the petition was sufficient to warrant relief based upon the requirements of Airoom. Therefore, the trial court properly denied Erika’s motion to dismiss the petition.
Erika also argues that the trial court erred in granting James’ petition without an evidentiary hearing. Again, we disagree.
The determination whether “a section 2 — 1401 petition should be granted lies within the sound discretion of the circuit court, depending upon the facts and equities presented.” (Airoom, 114 Ill. 2d at 221, 499 N.E.2d at 1386.) Therefore, the trial court’s decision will not be disturbed on appeal absent an abuse of the trial court’s sound legal discretion. (Airoom, 114 Ill. 2d at 221, 499 N.E.2d at 1386; Burchett v. Goncher (1991), 235 Ill. App. 3d 1091, 1100, 603 N.E.2d 1, 7.) Where the facts sufficient to support a grant of relief under section 2 — 1401 are challenged by the opposing party, a full and fair evidentiary hearing must be held. (Airoom, 114 Ill. 2d at 223, 499 N.E.2d at 1387.) However, a section 2 — 1401 petition may be granted solely on the basis of affidavits where the affidavits supporting and opposing the petition do not controvert one another. Ostendorf v. International Harvester Co. (1982), 89 Ill. 2d 273, 285-86, 433 N.E.2d 253, 259; see also Klein v. La Salle National Bank (1993), 155 Ill. 2d 201, 205.
In this case, Erika admitted in a verified pleading that she agreed to a deferment of James’ child support obligation while he attended college. However, in contrast, the written marital settlement agreement included a provision for the immediate payment of child support. Also, the affidavits and pleadings filed by both parties clearly show that Erika left for Texas immediately following the entry of the judgment. Furthermore, there was an agreement of the parties that the child would go to Texas, at least temporarily. However, again in contrast, the parties’ written agreement did not include even a mention of the removal of the child to Texas. We conclude the undisputed facts were sufficient to show that the written agreement violated the understanding of both parties.
In addition, Erika admitted the attorney did not discuss with them the actual burden of proof for a change of custody and told them “if they failed to agree [about the joint custody arrangement], they could go to court to have their differences resolved.” These undisputed facts were sufficient to clearly establish that the parties were misinformed about the legal effect of the written judgment. Because these facts were not controverted, we conclude the trial court did not abuse its discretion in granting the section 2 — 1401 petition without an evidentiary hearing.
We also note that reformation of the written marital settlement agreement to reflect the parties’ actual agreement would not have been appropriate in this case. Where a written agreement fails to reflect the actual agreement of the parties because of a mutual mistake, the agreement “may be reformed to reflect the intention of the parties and the agreement between them.” (Suburban Bank v. Bousis (1991), 144 Ill. 2d 51, 58, 578 N.E.2d 935, 939; see also Johnson, 237 Ill. App. 3d at 394-95, 604 N.E.2d at 388.) Here, however, the actual agreement of the parties regarding child support would not be enforceable because it was against public policy. (See In re Marriage of Michael (1992), 226 Ill. App. 3d 1088, 1090, 590 N.E.2d 998, 1000.) Also, while it is clear that the parties’ written agreement did not express their actual agreement regarding child custody, their affidavits show that the terms of the actual agreement are in dispute. We determine that in the absence of an agreement regarding child custody, a hearing by the court is necessary, as well as a complete opportunity for evidence to be presented by both sides. (In re Marriage of Staszak (1991), 223 Ill. App. 3d 335, 341, 584 N.E.2d 926, 930.) Based upon these unique circumstances, we conclude the trial court properly decided to hold a hearing to determine the best interests of the child regarding the issues of child custody and child support.
Erika next argues that Illinois does not have jurisdiction to make an initial custody determination. However, at oral argument her counsel conceded that the trial court could properly find Illinois has jurisdiction to determine custody. We agree. Based on the record, we conclude that Illinois has jurisdiction under the Uniform Child Custody Jurisdiction Act. Illinois had jurisdiction when Erika commenced the proceedings on December 18, 1991, because it was the home State of the child. (Ill. Rev. Stat. 1991, ch. 40, pars. 2104(a)(1), 2103.04.) Also, since James continues to reside here, we find that Illinois retains jurisdiction to determine custody of the child. Ill. Rev. Stat. 1991, ch. 40, par. 2104(b); In re Marriage of Hilliard (1989), 178 Ill. App. 3d 620, 624, 533 N.E.2d 543, 545.
Erika next contends, however, that the trial court abused its discretion when it declined to transfer the cause to Texas on the basis of forum non conveniens. Erika strenuously argues that Texas is the most appropriate forum. She points out that the child has resided in Texas since January 20, 1992. She also presented evidence that her family and friends reside in Texas and have knowledge concerning the child and her relationship with the child.
Section 8 of the Act allows á court to decline to exercise jurisdiction “if it finds that it is an inconvenient forum to make a custody determination under the circumstances of the case and that a court of another state is a more appropriate forum.” (Ill. Rev. Stat. 1991, ch. 40, par. 2108(a); In re Marriage of Elblkasy (1993), 241 Ill. App. 3d 662, 664, 610 N.E.2d 139, 140.) “The child’s home State, the location of necessary evidence of the child’s well-being, and the significant relationships of the child or parties to the competing States are considerations to be weighed in determining whether Illinois is an inconvenient forum.” (In re Marriage of Rizza (1992), 237 Ill. App. 3d 83, 88, 603 N.E.2d 134, 139.) The trial court’s primary objective is to determine which court can most capably act in the best interests of the child. (Elblkasy, 241 Ill. App. 3d at 665, 610 N.E.2d at 141.) A trial court’s decision not to decline jurisdiction will be affirmed on appeal absent an abuse of the trial court’s discretion. In re Marriage of Doehner (1991), 215 Ill. App. 3d 570, 572, 574 N.E.2d 1380, 1381-82.
Here, the child of the parties is residing in Texas pursuant to an agreed order granting Erika temporary custody. Also, a number of witnesses are located in Texas. However, James is present in Illinois and he has had visitation with the child in this State. Also, James testified that he has family and friends in Illinois who will be called as witnesses. In addition, Dr. Sue Moriearty is located in Illinois. We note that by agreement of the parties, Dr. Moriearty is conducting an evaluation of the parties and the child. Based upon all these circumstances, we conclude that the child has retained a significant connection with this State. See In re Marriage of Kehres (1987), 164 Ill. App. 3d 148, 154, 517 N.E.2d 617, 622.
Additionally, we note the record clearly shows that the child was removed from Illinois to Texas without the trial court’s knowledge or consent. We agree with the trial court’s reasoning that to transfer the cause to Texas under these circumstances would condone behavior which is contrary to the purposes of the Act. One of the Act’s stated purposes is to deter unilateral removals of children. (Ill. Rev. Stat. 1991, ch. 40, par. 2102(a)(5); In re Marriage of Godwin (1982), 104 Ill. App. 3d 790, 792, 433 N.E.2d 310, 312; see also Gainey v. Gainey (1992), 237 Ill. App. 3d 868, 871, 604 N.E .2d 950, 952.) Based upon our review of the record, we find no abuse of discretion in the trial court’s decision not to transfer the cause to Texas.
For the reasons indicated, the orders of the circuit court of Mc-Donough County are affirmed.
Affirmed.
BARRY, J., concurs.