
13 Ill. App.2d 405 (1957)
142 N.E.2d 165
Hector Peraza, Petitioner-Appellee,
v.
Manuel Tovar and Elsie Tovar, Respondents-Appellants.
Gen. No. 47,031.
Illinois Appellate Court  First District, First Division.
April 29, 1957.
Released for publication May 21, 1957.
*406 Moore, Ming & Leighton, Thaddeus B. Rowe, all of Chicago (Thaddeus B. Rowe, of Chicago, of counsel) for respondents-appellants.
*407 Henry J. Hyde, of Chicago, for petitioner-appellee.
PRESIDING JUSTICE NIEMEYER delivered the opinion of the court.
Respondents, grandparents of Hector Manuel Peraza, Jr., born June 17, 1951, appeal from a judgment order in a habeas corpus proceeding awarding custody of the child to his father, petitioner, and to Rachel Peraza, wife of petitioner.
The mother of the child is the daughter of respondents. She died December 24, 1951. The child was in the custody of respondents from a few weeks after his birth to May 22, 1954, when he was taken by petitioner. Respondents filed a petition for a writ of habeas corpus June 4, 1954, seeking the custody of the child. On June 7, 1954, after notice and hearing, at which petitioner herein was present as respondent, the temporary custody of the child was given to respondents, and thereafter, on February 7, 1955, at a hearing at which the petitioner herein  the father of the child  was not present or represented by counsel, a final order was entered awarding the custody of the child to his grandparents, petitioners in the first habeas corpus proceeding and respondents here. About eight months thereafter the petitioner herein filed a motion to vacate the order of February 7, 1955. This motion was denied because, as stated in the petition herein, the trial court "ruled that the custody order could not be vacated nor set aside out of term." On November 28, 1955 petitioner filed the petition for writ of habeas corpus, now before us, before the same judge who had entered the final order on the petition of respondents. He ordered that the writ issue, and thereafter the case was transferred to Judge B. Fain Tucker, who entered the order now complained of.
Motions were made by respondents to strike the petition for insufficiency. The first motion was denied *408 without prejudice by the trial judge who entered the order in the first proceeding, and later was denied by Judge Tucker on the final hearing herein. In the final order in the first habeas corpus proceeding the court specifically found that the then respondent, petitioner herein, "is an Alien subject to deportation from the United States because of illegal entry." The principal question in the trial court, and on this appeal, is the right of petitioner to the remedy sought in this proceeding because he is now, as respondents have stipulated, legally in the United States and not subject to deportation. We think that the allegations in the petition setting out the finding in the former order that petitioner herein was on February 7, 1955 illegally in the United States and subject to deportation, is not presently true, sufficiently informed respondent of the nature of petitioner's claim, and the court did not err in refusing to strike or dismiss the petition.
[1] Respondents contend first that the order of October 3, 1955 denying petitioner's motion to vacate the judgment order of February 7, 1955 is res judicata of the issues raised in the present petition. The motion was denied because petitioner misconceived his remedy and because the court was without jurisdiction to vacate the prior judgment on motion made more than 30 days after its entry. Res judicata cannot be based upon a remedy that is misconceived. Orminski v. Hyland Electrical Supply Co., 326 Ill. App. 392.
[2] Respondents contend that the present proceeding can be maintained only on a showing of a change in circumstances affecting the child subsequent to the entry of the order in the first proceeding; that a change in the condition or situation of the father of a child is not sufficient. No authorities are cited directly supporting this contention, and an examination of the numerous cases in our reports in habeas corpus and divorce involving the custody of minor children *409 wherein the decision is based on change in the condition of a parent, shows that respondents' contention in this respect is without merit.
Respondents further contend that the change, if any, in the right of petitioner to remain in the United States occurred prior to the entry of the final order of February 7, 1955, in the first proceeding, and therefore is not available as the basis of the present proceeding. They state in their brief: "Petitioner Peraza's status changed in January 1955, before the order of February 7, 1955. Actually, this fact disposes of this contention of petitioner." This statement is based upon the testimony of the petitioner, who stated that he was legally in the country at the time of his testimony; that he had gone to Mexico on the 17th of December 1954 and returned to the United States on January 20, 1955. He produced his Alien card. It was not received in evidence. He then produced a passport, which does not appear to have been received in evidence, and on its production counsel for petitioner stipulated that petitioner was then legally in this country. The position of respondents is somewhat inconsistent. If, as they contend, the finding of February 7, 1955 is conclusive and res judicata of petitioner's status as of that date, and petitioner was by respondents' stipulation legally in the country at the time of the trial, the change in status must have occurred subsequent to the time of the entry of the final order.
[3, 4] Affirmance of the order appealed from, insofar as it grants custody to petitioner, rests on firmer ground. In proceedings in habeas corpus for the custody of minor children, as in proceedings in divorce suits involving the custody of minor children, the welfare of the children is the primary and controlling factor. The rules, therefore, as to the institution of new proceedings in habeas corpus, or moving to modify a former order or decree fixing the custody *410 of children, are necessarily the same. The rule is broader than stated by respondents  that a change in conditions occurring subsequent to the prior order is the only basis for a new proceeding in habeas corpus or a modification of a former order in a divorce suit. The rule as to the power of the court in divorce proceedings is stated in 17 Am. Jur., Divorce and Separation, section 684, as follows:
"A decree fixing the custody of a child is, however, final on the condition then existing and should not be changed afterwards unless on altered conditions since the decree or on material facts existing at the time of the decree but unknown to the court, and then only for the welfare of the child."
The Illinois cases support this rule. In People ex rel. Stockham v. Schaedel, 340 Ill. 560, a habeas corpus proceeding brought by the father to procure the custody of two minor sons whose custody had been awarded to the father in a divorce proceeding in Ohio  the children at the time of the habeas corpus suit being in the custody of the mother in Illinois, the Supreme Court, in affirming the order of the trial court remanding the children to the custody of the mother, held that the order in the divorce suit was not conclusive as to the rights of the respective parents to the custody of the children, and said (p. 563):
"In 19 Corpus Juris, 366, with reference to foreign decrees for the custody of children, it is said: `Usually such decrees are necessarily provisional and temporary in character, and are ordinarily not res judicata, either in the same court or that of a foreign jurisdiction, except as to the facts before the court at the time of the decree.'" (Emphasis added.)
In Thomas v. Thomas, 233 Ill. App. 488, p. 493, the court said:
*411 "A decree fixing the custody of a child is final on the conditions then existing and should not be changed afterwards unless on altered conditions since the decree, or on material facts existing at the time of the decree but unknown to the court, and then only for the welfare of the child. 9 R.C.L. 476." (Emphasis added.)
Similarly, in Harms v. Harms, 323 Ill. App. 154, p. 159, the court said:
"The court would not be justified in altering the original decree as to the custody of the children unless there was a change in the situation, or unless facts or circumstances which should have been called to the attention of the court at the time the decree was entered, were overlooked." (Emphasis added.)
See also People ex rel. Potter v. Potter, 2 Ill. App.2d 419, 426-427, and Nye v. Nye, 343 Ill. App. 477, 481.
[5, 6] Petitioner did not appear on the final hearing of the habeas corpus proceeding brought by respondents herein. He had been served with summons, but through inadvertence or oversight he was not advised of the final hearing of the case, and states in his petition that his then attorney knew nothing of the entry of the order until February 21, 1955, and that the attorney failed to take any immediate steps to vacate the order. The matters relied on by petitioner to establish his legal presence in this country were never presented in the first habeas corpus action. We agree with the trial court that the finding in the first case that petitioner herein  respondent in that proceeding  was an Alien subject to deportation for illegal entry into the United States, must have been an influencing factor in the case, and that the legal presence of petitioner in the country at the time of the trial in this proceeding was a change of circumstances *412 which would give the court jurisdiction. There is nothing in the record tending to show unfitness or inability of petitioner to properly care for and rear his son. He is married; at the time of the trial had a baby girl about one year old; his present wife is willing to take the boy into the family. Under the circumstances the child should be reared by his father. The welfare of the child should not be affected by the negligence, if any, of petitioner or his attorney in failing to appear in the first habeas corpus proceeding.
[7] The wife of the petitioner is not a party to this proceeding. She has no claim to the custody of the child, and the judgment order before us is erroneous in awarding the custody to petitioner and to Rachel Peraza, his wife.
The order granting custody to petitioner is affirmed, and that part of the order granting custody to his wife is reversed.
Affirmed in part, reversed in part.
BURKE and FRIEND, JJ., concur.
