delivered the opinion of the court:
Plaintiff appeals from an order dismissing with prejudice and at plaintiff’s costs her complaint amended from alternative counts for divorce and separate maintenance to a single count of separate maintenance. The dismissal order contains a finding the trial court had no jurisdiction of the subject matter for want of proper venue.
The complaint alleges plaintiff was a resident of the State of Illinois for more than one year immediately preceding filing, but is silent as to county where either party resided, where their marital home was located, or where plaintiff’s abandonment occurred. The allegations continue that the parties were married in Oak Park, Cook County, Illinois, have two sons 11 and 9 years of age, and are joint obligors on a contract to purchase real estate in Cook County. The divorce counts are grounded on adultery and mental cruelty. It is alleged that defendant left the marital home to reside with another woman about a month and a half before the complaint was filed.
Plaintiff filed her complaint in Me Henry County on February 26, 1970. On March 23, 1970, the defendant voluntarily filed his appearance and answer. Summons was not served on the defendant. On April 1, 1970, by stipulation, an agreed order was entered for temporary custody, temporary support and alimony in the sum of eighty dollars per week, and visitation by the defendant.
On the day set for trial, plaintiff obtained leave to file an amended complaint containing only a single count for separate maintenance, again without allegation as to county. Defendant responded with a petition to dismiss on the ground the court had no jurisdiction over the matter, alleging “he never has been and is not now a resident of that (Me Henry) County nor is plaintiff a resident of that (McHenry) County, both plaintiff and defendant being residents of County of Cook, State of Illinois, and prior to that the county of Du Page, Illinois.” His petition further stated that defendant had previously appeared and answered “as *725the divorce action filed was the then desire of both plaintiff and defendant, the grounds for Motion for Dismissal * * # were waived by the defendant to expedite the hearing for divorce # Defendant’s request, incorporated into this petition, that it be considered a special and limited appearance to contest jurisdiction “over defendant” is without merit so far as jurisdiction of defendant’s person is concerned. He had previously submitted his person to the jurisdiction of the court by filing his general appearance, answer to plaintiff’s original complaint, and by stipulating to an agreed order. In his appellate brief, defendant argues lack of jurisdiction only of the subject matter.
Plaintiff urges that jurisdiction of the subject matter is sufficiently established by her residence in Illinois for more than a year preceding the filing of her complaint in Me Henry County. It is plaintiff’s position that the venue provision of the Divorce Act, “the proceeding shall be had in county where the plaintiff or defendant resides” (111. Rev. Stat. 1969, ch. 40, par. 6) and the requirement of the Separate Maintenance Act that proceedings shall be instituted in the county of the husband’s residence or the county where the wife’s abandonment occurred (111. Rev. Stat. 1969, ch. 68, par. 23) were capable of waiver by defendant’s appearance and agreement to the temporary support and alimony order entered in Me Henry County.
Although the Civil Practice Act does indeed provide for waiver of all objections of improper venue (Ill. Rev. Stat. 1969, ch. 110, par. 8) with neither divorce nor separate maintenance actions excepted from its scope (same, par. 1; see also Nye v. Nye (1950), 342 Ill.App. 11, 14, 94 N.E.2d 909) the Divorce and Separate Maintenance Acts provide that process, practice and pleading shall be the same as in other civil cases, except as otherwise provided by the Act or by any law or rule of court; (Italics ours, Ill. Rev. Stat. 1969, ch. 40, par. 7 and ch. 68, par. 23.2) and case law has long construed the venue requirements in both actions to be extraordinary and jurisdictional in nature. Jurisdiction of the subject matter thus cannot be waived or conferred upon the court by consent of the parties.
Courts have no inherent equity power in either proceeding, as divorce and separate maintenance actions were unknown to common law, and jurisdiction to hear and determine such cases and all related matters is conferred only by statute. The power of the court may be exercised only within the limits of the statutory grant of jurisdiction. Clubb v. Clubb (1949), 402 Ill. 390, 400, 84 N.E.2d 366; Plotinsky v. Plotinsky (1926), 241 Ill.App. 166, 169.
Venue provisions concerning the county where suit may be instituted have been held mandatory and jurisdictional in nature both in divorce *726 (People ex rel. Bradley v. McAuliffe, 24 Ill.2d 75, 80, 81, 179 N.E.2d 616; In re Estate of Goldberg (1937), 288 Ill.App. 203, 207, 5 N.E.2d 863, cert. den. 302 U.S. 693; Dean v. Dean (1943), 381 Ill. 514, 515, 46 N.E.2d 59), and in separate maintenance actions, Briney v. Briney (1921), 223 Ill.App. 119, 121.
Although early decisions of the Illinois Supreme Court, Peeples v. Peeples (1857), 19 Ill. 269; Parker v. Parker (1871), 61 Ill. 369 held that the statutory venue requirement concerning the county in which a divorce action could be instituted was capable of waiver, these cases were expressly overruled in Bleckenberg v. Bleckenberg (1908), 232 Ill. 120, 83 N.E. 423, and Briney v. Briney, supra, at 223 Ill.App. 121 expressly applied the Bleckenberg opinion to separate maintenance actions. These decisions continue effective and controlling in interpreting the venue requirements of the Divorce and Separate Maintenance Acts as mandatory and material, being jurisdictional in nature, and they are consistently followed where a jurisdictional defect actually exists. The omission of a venue allegation, however, is not necessarily fatal as it may be supplied by amendment before decree upon remand to the trial court (Plotinsky v. Plotinsky, supra, at 241 Ill.App. 171, 172), even where the original complaint may be a nullity, an amended complaint may invoke the trial court's jurisdiction of the subject matter (Carbrey v. Carbrey (1969), 108 Ill.App.2d 363, 369, 247 N.E.2d 818), after decree the AppeHate Court has drawn an inference of the essential venue from the entire record O’Laughlin v. O’Laughlin (1955), 4 Ill.App.2d 323, 326, 124 N.E.2d 88; and has amended pleadings to conform to proof upon its own motion, Kijowski v. Kijowski (1962), 36 Ill.App.2d 94, 96, 97, 183 N.E.2d 583.
Defendant’s petition to dismiss does not specify whether it was filed pursuant to Section 45 of the CivH Practice Act, Motions with respect to pleadings, or Section 48 of that Act, Involuntary dismissal based upon certain defects or defenses (Ill. Rev. Stat. 1969, ch. 110, pars. 45 and 48). It appears to be filed pursuant to Section 48, however, as it is verified and includes factual allegations which do not otherwise appear on the face of the pleadings. It is to be noted that Ill. Rev. Stat. 1969, ch. 110, par. 48(a) authorizes involuntary dismissal where the court does not have jurisdiction of the subject matter, provided the defect cannot be removed by transfer of the case to a court having jurisdiction. (Emphasis supplied). Plaintiff alleged, and defendant admitted, she had been a resident of Illinois for more than one year immediately preceding the filing of her original complaint, so it does appear that if jurisdiction of the subject matter is in fact lacking in McHenry County the cause is capable of transfer to the Circuit Court of the proper county in Illinois, *727and transfer rather than dismissal is the disposition provided by statute where the jurisdictional defect can be removed.
No evidence was taken at hearing on defendants petition to dismiss, the matter was determined on arguments of counsel, and a transcript of that hearing has not been provided to us. In its memorandum of decision, the trial court mentioned it was admitted plaintiff was not a resident of Me Henry County at the time of filing the amended complaint and “it seemed to be almost conceded plaintiff was not a resident at the time the suit was filed.”
On this record we cannot say whether a jurisdictional defect actually exists in McHenry County, nor do we find the trial court’s memorandum of decision helpful. We find it inappropriate to put plaintiff out of court on an “almost” concession and believe jurisdiction does not turn on plaintiff’s residence at the time of filing the amended complaint. The general rule is that jurisdiction of a court over a cause depends on the state of facts at the time the action is brought, and it has been held that a change of plaintiff’s residence after filing an original complaint for divorce and before filing a supplemental complaint for divorce did not divest tíre court of jurisdiction. (See Kovac v. Kovac (1960), 26 Ill.App.2d 29, 167 N.E.2d 281 and cases cited therein.)
Sandra Chrastka, plaintiff herein, should be allowed reasonable opportunity to amend her complaint to include allegations of venue or counts for divorce and to present such evidence of venue as she may desire or be able to do. In the event venue is not shown to be in Me Henry County, but in another county within Illinois, the order of the trial court should not be dismissal, but transfer of plaintiff’s cause of action to such other county upon the court’s own motion or that of either party. (Sec. 10 of the Civil Practice Act, Ill. Rev. Stat. 1969, ch. 110, par. 10.) The Illinois Supreme Court construed the Venue Act of 1891 as empowering a court of record without jurisdiction of the subject matter to transfer a cause of action to the proper county (Central Ill. Service Co. v. Industrial Comm. (1920), 293 Ill. 62, 68, 69, 127 N.E. 80), and in 1946, after adoption of the Civil Practice Act, stated that want of jurisdiction in the first instance does not prevent courts of record from exercising the sole function of transferring the cause to the proper venue as they are given special and limited jurisdiction for that purpose. (Herb v. Pitcairn (1946), 392 Ill. 138, 149, 64 N.E.2d 519.) Any court having jurisdiction of the subject matter will also have discretion to order payment of plaintiff’s attorney’s fees and costs as may be provided by statute, commencing with the filing of her original complaint in Me Henry County. We believe this discretion in any court to which the cause might be *728properly transferred flows logically from the statutory provision that a transferred case “shall proceed and be determined as if it had originated in that court.” Ill. Rev. Stat. 1969, ch. 110, par. 10(3).
Plaintiff’s original complaint was filed February 26, 1970. Defendant’s petition to dismiss was filed June 3, 1970. While this petition alleges, without contradiction, both defendant’s past and present non residence in McHenry County, it alleges only Mrs. Chrastka’s present non residence in McHenry County, present residence of both parties in Cook County, and their prior residence in Du Page County. This pleading reinforces our view that inquiry into removal of any jurisdictional defect in Me Henry County by transfer to another county is warranted, and we note it does not exclude plaintiffs abandonment in Me Henry County.
This disposition, we believe, is equitable to both parties and surely not unfair to defendant. If Me Henry County ultimately shall appear to be one where venue does not exist, defendant’s petition indicates that he knowingly, and perhaps more enthusiastically than plaintiff, participated in the proceeding there without objecting to improper venue until his own objectives were no longer being served.
Judgment is therefore reversed and the cause is remanded with direction to the trial court to vacate the order of dismissal.
ABRAHAMSON, J., concurs.