
192 Ill. App.3d 501 (1989)
548 N.E.2d 518
In re MARRIAGE OF THOMAS P. NOBLE, Petitioner-Appellee, and JOY C. NOBLE, Respondent-Appellant.
No. 2-88-0995.
Illinois Appellate Court  Second District.
Opinion filed December 5, 1989.
Rehearing denied January 29, 1990.
*502 *503 Sheridan & Associates, of Wheaton (Gerald M. Sheridan, Jr., of counsel), for appellant.
Fortunato, Farrell & Davenport, Ltd., of Westmont (Linda E. Davenport, of counsel), for appellee.
Order reversed.
JUSTICE DUNN delivered the opinion of the court:
Respondent Joy Noble (Joy) appeals from an order vacating joint custody of her son, Thomas Noble, Jr. (Tommy), and from an order granting sole custody to the child's father, petitioner Thomas Noble (Tom). The trial court vacated the joint-custody order after hearing testimony in support of Tom's petition for a change in primary custody filed approximately two months after the joint-custody order. After a second hearing under section 602 of the Illinois Marriage and Dissolution of Marriage Act (the Act) (Ill. Rev. Stat. 1987, ch. 40, par. 602), the trial court granted sole custody to Tom.
On appeal, Joy contends the following: (1) the trial court lacked jurisdiction to hear the modification petition where it was filed more than 30 days after the custody judgment; (2) the trial court erred in failing to grant her motion to dismiss for failure to state a cause of action under section 610 of the Act; (3) the trial court erred in failing to apply section 610(a) of the Act to the modification proceeding; (4) the trial court erred in excluding a psychologist's report because it was hearsay; (5) the award of custody to Tom was against the manifest weight of the evidence; and (6) the trial court erred in granting a second change of venue to petitioner. Because we find the trial court erred in failing to comply with section 610 of the Act, we reverse.
*504 The parties were married August 28, 1983. On February 13, 1985, Tom filed a petition for dissolution of marriage. Joy gave birth to Tommy July 17, 1985.
During the dissolution proceedings, the parties participated in the Du Page County conciliation program, where they met with Dr. Katie Gienapp, who made two recommendations for joint custody in a written report. She first recommended that Joy maintain primary care for Tommy, while giving Tom responsibility for Tommy Tuesday and Thursday from 5 a.m. through 8 p.m., and Saturday from 5 p.m. through Sunday 7 p.m., and alternating holidays. She also recommended that if Joy decided to move to Tennessee, which Joy was unsure about at the time of counseling, Joy should care for Tommy six weeks in Tennessee, and Tom should care for Tommy two weeks in Illinois. Dr. Gienapp recommended that the latter option be reviewed frequently and reassessed after one year.
On August 18, 1987, following a hearing on the judgment of dissolution, the trial court ordered the parties to submit written closing arguments. The court also set for hearing a petition filed by Joy for removal of the child. In her closing argument, Joy asked the court to approve the custody arrangement set out by Dr. Gienapp. More specifically, Joy asked the court to enforce the first recommendation until a hearing on Joy's petition for removal and, after that time, to enforce Dr. Gienapp's second recommendation.
In a letter opinion, September 9, 1987, the trial court stated that it understood the parties had stipulated to joint custody and would enter into a joint-parenting agreement containing the recommendations of Dr. Gienapp. On September 21, 1987, the trial court denied Joy's motion for removal. The judgment of dissolution was entered November 12, 1987. Incorporated in the judgment was a joint-parenting order. It was not a joint-parenting agreement; the word "agreement" had been crossed out for the word "order." The joint-parenting order incorporated Dr. Gienapp's first recommendation for joint custody, making Joy the primary caretaker and giving Tom caretaking responsibility approximately three days a week, but it did not incorporate the recommendation provided in case Joy moved to Tennessee.
On December 21, 1987, Tom responded to Joy's pro se petition for payment of past-due child support with a counterpetition for primary custody of the child. Tom alleged it was in Tommy's best interest that he be granted primary custody. Representing herself pro se, Joy responded to the petition. The court set the matter for hearing April 4, 1988. At the hearing, Joy's attorney moved orally to dismiss the petition, but the trial court refused to hear the motion because it was not *505 in writing. Respondent filed a written section 2-615 motion to dismiss (Ill. Rev. Stat. 1987, ch. 110, par. 2-615) after testimony had commenced.
On April 12, 1988, after a hearing on the counterpetition, the court denied the motion to dismiss and, rather than grant or deny petitioner's request for primary custody, vacated the original custody order. The court found authority for this action within its equitable powers based on the court's finding that the original custody order resulted from direct misrepresentation by Joy. The court found that evidence which showed Joy moved to downstate Illinois or to Tennessee proved she had no intention of abiding by the original custody order. The court then ordered a new hearing to determine child custody pursuant to section 602 of the Act.
On September 7, 1988, after a full hearing, the court granted sole custody to Tom, allowing Joy visitation provided that she present to the court proof of a known address other than her parents' in Tennessee.
 1, 2 Joy first contends the trial court lacked jurisdiction to entertain Tom's petition for primary custody because it was filed more than 30 days after the custody judgment. Ordinarily, a trial court loses jurisdiction to vacate or modify a judgment after 30 days from entry of a final and appealable judgment. (People ex rel. McGraw v. Mogilles (1985), 136 Ill. App.3d 67, 71.) In a case involving a child-custody judgment, however, a circuit court has continuing jurisdiction. Section 601 of the Act provides that a court has jurisdiction to make a child-custody determination in original or modification proceedings (Ill. Rev. Stat. 1987, ch. 40, par. 601(a)). "Children of divorced parents traditionally have been considered wards of the divorce-granting court, which has continuing jurisdiction over matters affecting them." (In re Custody of Sexton (1981), 84 Ill.2d 312, 320.) Thus, we find no merit to Joy's first issue of appeal.
 3 Next, Joy contends the lower court erred in refusing to grant her section 2-615 motion to dismiss (Ill. Rev. Stat. 1987, ch. 110, par. 2-615). In her motion, Joy argued Tom alleged no set of facts under section 610(b) of the Act to demonstrate a basis for modification. On appeal, Joy now argues Tom failed to comply with section 610(a) (not section 610(b)). Section 610(a) of the Act (Ill. Rev. Stat. 1987, ch. 40, par. 610(a)) provides:
"(a) Unless by stipulation of the parties, no motion to modify a custody judgment may be made earlier than 2 years after its date, unless the court permits it to be made on the basis of affidavits that there is reason to believe the child's present environment *506 may endanger seriously his physical, mental, moral or emotional health."
Tom moved for primary custody less than two months after the custody judgment. He did not file an affidavit or allege in his petition that the child's present environment seriously endangered his well-being, and the parties had not agreed to modification. Tom's petition alleged that it was in Tommy's best interest that he be granted primary custody because of the following: he had been Tommy's primary caretaker since the custody judgment; Joy had not provided a home for Tommy except when she had him in motels or her automobile; Joy had no steady employment or permanent residence; and Joy failed to use child support for Tommy's best interest.
 4-6 A petition to change the primary custody of a child, though not a petition to undo joint custody, is a modification under section 610. (In re Marriage of Gargus (1981), 97 Ill. App.3d 598, 606; In re Marriage of Friedman (1981), 100 Ill. App.3d 794, 803.) A petition that fails to allege the statutory grounds under section 610(a), specifically, endangerment to the child, is subject to dismissal upon a motion to dismiss. (In re Custody of Dykhuis (1985), 131 Ill. App.3d 371, 373.) The supreme court, in In re Custody of Sexton, has held that section 610(a) is a mandatory, rather than a directory, provision, because the consequence of noncompliance, that the child-custody modification motion be disallowed, is clearly provided in the Act. (Sexton, 84 Ill.2d at 319.) The court also held, however, that failure to file affidavits in compliance with this section would not render a judgment void for lack of jurisdiction; compliance could be waived. (Sexton, 84 Ill.2d at 320-21.) Whether a party waived compliance would depend on the facts of the case. (Sexton, 84 Ill.2d at 321.) In Sexton, the court held the requirement waived where appellant had not objected to holding the hearing on the petition; appellant sought to gain advantage on appeal by silence in the trial court; petitioner's verified complaint set forth specific facts informing the court of the basis for custody change; and the facts not sworn to by affidavit were testified to in open court. Sexton, 84 Ill.2d at 321-22.
Tom argues Joy has waived raising section 610(a) in support of dismissal of the petition because she failed to raise it below. Tom correctly observes that Joy raised section 610(b) in her motion to dismiss rather than section 610(a). In her motion, Joy contended that the counterpetition failed to allege any facts to demonstrate a basis for modification under section 610(b). Joy listed the three instances under section 610(b) that would allow a court to modify a custody judgment: (1) the custodian agreed to modification; (2) the child had been integrated *507 into the family of the plaintiff with consent of the guardian; and (3) the child's present environment endangers "seriously" (emphasis added by Joy) his physical, mental, moral or emotional health. This provision was not in effect when Joy filed her motion in 1988. It had been amended in 1981, eff. July 1, 1982. (Ill. Rev. Stat. 1981, ch. 40, par. 610(b), effective July 1, 1982; see In re Marriage of Wechselberger (1983), 115 Ill. App.3d 779, 784-85.) The new version does not require the trial court to find one of the three statutory factors. It provides:
"The court shall not modify a prior custody judgment unless it finds by clear and convincing evidence, upon the basis of facts that have arisen since the prior judgment or that were unknown to the court at the time of entry of the prior judgment, * * * in the case of a joint custody arrangement that a change has occurred in the circumstances of the child or either or both parties having custody, and that the modification is necessary to serve the best interest of the child." Ill. Rev. Stat. 1987, ch. 40, par. 610(b).
Though Joy failed to cite section 610(a) and failed to cite the operative section 610(b) provision, the trial judge, nonetheless, somehow understood her motion to be based on section 610(a). In his letter opinion following the hearing, the court stated:
"Such conduct cannot be condoned by allowing the Respondent now to stand behind Section 610 and state that the petition for Change of Custody is filed less than 2 years from the date of the Entry of Judgment and therefore modification cannot be effected unless the Court can find that the child's present environment may endanger seriously his physical, mental, moral or emotional health."
By these remarks, the trial court demonstrates that it understood Joy's motion to be based on section 610(a), specifically, the requirement that the court find the child's environment may place him in serious danger before the court may proceed to hear a modification petition within two years of the initial custody order. The court's remarks make no reference, however, to the affidavit requirement or a requirement that the petition allege the statutory factors. Thus, there is no evidence that the trial court understood Joy's motion to be based on these specific factors.
This case offers a much closer waiver issue than Sexton. Here, unlike Sexton, there was an objection, albeit off the mark, to the hearing proceeding, and the trial court was aware that respondent objected on the basis of section 610(a), though perhaps not on the basis raised on *508 appeal. Also, unlike Sexton, the petition in the case at bar did not even allege that the child's present environment seriously endangered his well-being.
 7 On the other hand, the parties did participate in a full hearing in which both sides presented evidence. In Sexton, the court held that in the interests of judicial economy and simple justice, it would make little sense to remand for a new hearing, where the standard for changing custody is identical to the standard used to judge the affidavits. (Sexton, 84 Ill.2d at 322.) In Sexton, the lower court had found that the child's present environment seriously endangered his mental, moral and emotional health. (Sexton, 84 Ill.2d at 315.) The concern in a custody proceeding is always, of course, the best interest of the child. Where the parties have had an opportunity to present evidence concerning the child's best interest, it would be senseless to exalt form over substance and remand for failure to file a proper pleading or affidavit. We find, therefore, Joy's objections under section 610(a) to Tom's petition for custody modification waived by her participation in the hearing and her failure to cite the correct statute in support of dismissal.
Joy next contends that even if there was waiver, the trial court erred in modifying the custody order within two years without finding that the child's environment may place him in serious danger. Section 610(a) does not state that this finding is required; however, we held in In re Custody of Carter (1985), 137 Ill. App.3d 439, 442, that it would make little sense to require the court to make a preliminary finding based upon an affidavit and then not apply this standard at trial. Because the trial court failed to make this finding in Carter, we reversed. Carter, 137 Ill. App.3d at 443.
 8 This result enforces the policy behind section 610(a). Section 610(a) represents a legislative policy strongly favoring the finality of child-custody judgments. (Sexton, 84 Ill.2d at 318-19.) At the same time, it provides a "`safety valve' for emergency situations" where modification is otherwise prohibited. (Ill. Ann. Stat., ch. 40, par. 610(a), Historical & Practice Notes, at 94 (Smith-Hurd 1980), quoting Uniform Marriage and Divorce Act, 9A U.L.A. § 409, Commissioner's Note, at 212 (1973).) In In re Custody of Harne (1979), 77 Ill.2d 414, 420, the supreme court quoted another part of the commissioner's note to section 409 of the Uniform Marriage and Divorce Act, which is the equivalent of section 610. It stated:
"Most experts who have spoken to the problems of post-divorce adjustment of children believe that insuring the decree's finality is more important than determining which parent *509 should be the custodian. * * * This section is designed to maximize finality (and thus assure continuity for the child) without jeopardizing the child's interest." 77 Ill.2d at 420, quoting 9A U.L.A. § 409, Commissioner's Note (1973).
 9 The court in the case at bar did not make a finding that the child may be in serious danger and, in fact, rejected respondent's contention that it must be made. The court stated:
"Accordingly, the court finds that the order establishing joint custody of the minor child was entered by the court as a result of the direct misrepresentation by the respondent. Such conduct cannot be condoned by allowing the respondent now to stand behind section 610 and state that the petition for change of custody is filed less than 2 years from the date of the entry of the judgment and therefore modification cannot be effected unless the court can find that the child's present environment may endanger seriously his physical, mental, moral or emotional health.
Pursuant to the equitable powers of the Court and pursuant to the prayer for relief in Paragraph E of the Petitioner's Petition to change custody it will be the order of this court that the Judgment of Dissolution as it relates to child custody and the Joint Parenting Order as previously entered by this court shall be vacated. The matter will be set for hearing to determine pursuant to Section 602 the custody of the minor child Tommy."
Since the court clearly failed to find that the child's present environment may seriously endanger his physical, mental, moral, or emotional health, we must reverse.
 10, 11 Tom argues the court was not required to apply section 610(a) because it vacated the prior judgment based upon a finding that it resulted from Joy's fraud upon the court. We are not persuaded. Tom argues that all judgments obtained by fraud are void and subject to being vacated by the court at any time. This is not so. Only judgments which are procured by fraud that gives the court colorable jurisdiction are void. (Schwarz v. Schwarz (1963), 27 Ill.2d 140, 144-45.) Fraud which occurs after the court acquires jurisdiction, such as false testimony or concealment, renders the judgment voidable only, subject to collateral attack only under the procedure set out in section 2-1401 of the Code of Civil Procedure (Ill. Rev. Stat. 1987, ch. 110, par. 2-1401). (James v. Chicago Transit Authority (1976), 42 Ill. App.3d 1033, 1035.) In this case, neither the court nor Tom cited a lack of jurisdiction. Thus, Tom could attack the judgment only under *510 section 2-1401. He did not do so. He never moved to vacate the judgment, and he made no allegation of fraud or misrepresentation. He asserted only that in the best interests of his child, he should be granted primary custody. Thus, the court did not have a petition to vacate before it, and it erred in granting equitable relief where it was not prayed for. See Mogilles, 136 Ill. App.3d at 73.
Assuming for the sake of argument that Tom had moved to vacate the judgment, we find the record fails to support the trial court's finding that the initial custody agreement resulted from Joy's misrepresentations. The court found Joy's conduct following the custody judgment to be against the express intention of the parties, that Joy had no intention of allowing the joint-parenting order to be implemented. The court based this finding on evidence which showed Joy moved to Tennessee in December 1987, shortly after the joint-custody judgment. The fact that Joy moved to Tennessee does not establish that she made misrepresentations to the court. There is no evidence in the record that Joy agreed not to leave Illinois in order to procure the child-custody judgment. To the contrary, the record shows Joy made well known her desire to move to Tennessee. Before the custody judgment was entered, she expressed this desire to the court and Dr. Gienapp. Dr. Gienapp's recommendations even provided a custody plan if Joy decided to move to Tennessee. Joy also moved for leave to remove the child from Illinois before the court entered the custody judgment.
 12 Thus, there is no evidence to support the trial court's opinion that respondent made misrepresentations to the court to procure the child-custody judgment. The court had no basis for disregarding section 610(a); its decision was an abuse of discretion. Furthermore, since there was no basis for vacating the initial custody order, there, too, was no basis for ordering the parties to conduct a new custody proceeding pursuant to section 602 instead of a modification proceeding under section 610. The trial court had no authority to proceed under section 602. We, therefore, reverse the order granting Tom sole custody and reinstate the original joint-custody order under the authority vested by Supreme Court Rule 366 (107 Ill.2d R. 366(a)(1)).
 13, 14 The remaining issues raised by Joy need not be addressed given our finding that the court had no authority to vacate the custody judgment. We will, nonetheless, address one other issue that may arise in the future. Joy contends, and we agree, that the trial court erred in denying admission of Dr. Gienapp's report because it was hearsay. Section 605 of the Act provides that a court may consider the report of a court-appointed investigator in a contested custody *511 proceeding (Ill. Rev. Stat. 1987, ch. 40, par. 605(c)). Any party may then call the investigator for cross-examination. The statute provides an exception to the hearsay rule. Thus, it was error for the court to deny admission of the report because it was hearsay. Tom's reliance on In re Marriage of Kutinac (1989), 182 Ill. App.3d 377, is misplaced. Kutinac involved a removal proceeding, which is not considered a custody matter (In re Custody of Mueller (1979), 76 Ill. App.3d 860, 862). Therefore, section 605 did not apply to Kutinac. Tom also argues that because section 605 states that a court "may" consider the report, the court did not err in refusing to consider it. We find no merit to this contention since the record plainly shows the trial court did not merely deny admission of the report as a reasoned exercise of discretion, but did so solely because it was hearsay.
Reversed.
UNVERZAGT, P.J., and WOODWARD, J., concur.
