
203 Cal.App.2d 22 (1962)
MINNA SIEGAL, as Special Administratrix and Executrix, etc., Petitioner,
v.
THE SUPERIOR COURT OF LOS ANGELES COUNTY, Respondent; PEDRO R. MORILLON, as Administrator, etc., Real Party in Interest.
Civ. No. 26211. 
California Court of Appeals. Second Dist., Div. Four.  
Apr. 27, 1962.
 G. V. Weikert for Petitioner. *23
 No appearance for Respondent.
 Jerome Weber and Bertram S. Harris for Real Party in Interest.
 THE COURT.
 This is a petition for a writ of mandate to compel the respondent superior court to dismiss an action in which petitioner is a defendant.
 A written contract was entered into on April 1, 1960, by Rancho Tomasina of Guaymas Valley, Sonora, Mexico, with Peerless Produce, Inc., and Al Siegal, concerning the production and sale of watermelons under which, inter alia, the latter parties agreed to pay to Rancho Tomasina the sum of $10,000. Al Siegal died in the county of Los Angeles on or about August 10, 1960. A creditor's claim against the estate was filed on behalf of Rancho Tomasina and was rejected. Whereupon the within action upon the claim was brought against the executrix of the estate of Al Siegal, deceased. Peerless Produce, Inc., is not named as a defendant.
 The complaint names as plaintiff "Pedro R. Morillon, Administrator of the Estate of Tomasina Jamison Provas, a Minor, owner of Rancho Tomasina." The minor is alleged to be a Mexican citizen, the owner of Rancho Tomasina. It is not alleged that Morillon is qualified as guardian in this state.
 Petitioner filed her answer to the complaint which denies generally the allegations thereof, including a denial, for lack of information or belief, of the allegations respecting the official capacity of Pedro R. Morillon as administrator of the estate of the Mexican minor. It is asserted in the within petition that following the decision of this court in Mayer v. Willing, 196 Cal.App.2d 379 [16 Cal.Rptr. 476] petitioner served and filed a notice of motion for judgment of dismissal upon the ground that the plaintiff, a resident of Mexico, as the alleged "Administrator of Tomasina Jamison Provas, a minor and a Mexican citizen" lacks capacity to maintain the action. The motion was presented and argued, following which this minute order was made and entered: "Motion denied. (CCP 1913) (In Re Rawitzer's Estate, 175 Cal. 585 [166 P. 581]; Fox v. Tay, 89 Cal. 339 [24 P. 855, 26 P. 897, 23 Am.St.Rep. 474]; Lewis v. Adams, 70 Cal. 403 [11 P. 833, 59 Am.Rep. 423])." Petitioner thereafter moved for a reconsideration of the motion which was denied by this minute order: "Motion denied. This is not a suit by a foreign administrator *24 on a matter arising out of his administration; it is a suit by a contracting party for payment under the contract."
 It is obvious that Pedro R. Morillon, as administrator or otherwise, is not a contracting party and no cause of action is stated as to him. The contract, set forth in full in the margin,  [fn. 1] shows that it was made for "Tomasina" owner of Rancho Tomasina "represented by" Tom Jamison. There is no indication that Rancho Tomasina is a legal entity. [1] In determining who are parties, the allegations of the complaint may be looked to as well as the caption. (Miller v. Superior Court, 26 Cal.App. 41, 44 [146 P. 72].) The complaint herein, as well as the contract itself, shows the Mexican minor "Tomasina" (her full name stated in the pleading as "Tomasina Jamison Provas") to be the owner of Rancho Tomasina and thus the real party in interest under the contract and the complaint.
 Code of Civil Procedure, section 372, provides in part: "When an infant, or an insane or incompetent person is a party, he must appear either by his general guardian or by a guardian ad litem appointed by the court in which the action is pending, or by a judge thereof, in each case." As stated in Witkin, California Procedure, section 26, page 1003: "It should be understood that the infant or incompetent is the party and the suit should be in his name; the guardian or guardian ad litem merely appears for him. Hence, in actions *25 by an infant or incompetent, the party plaintiff should be designated 'A, an insane person (or a minor), by G, his guardian (or guardian ad litem).' It is improper to sue in the name of the guardian himself. [Citing cases.]" This defect was not raised by demurrer or answer, and is not the basis of the within petition. Such defect could be cured by amendment and presents no jurisdictional question. (See Klopstock v. Superior Court, 17 Cal.2d 13, 19-22 [108 P.2d 906, 135 A.L.R. 318] (and cases there cited); Lindsey v. Superior Court, 100 Cal.App. 37, 40-41 [279 P. 837]; Alvez v. Toprahanian, 39 Cal.App.2d 126 [102 P.2d 566]; Kirman v. Borzage, 75 Cal.App.2d 865 [172 P.2d 90]; Dixon v. Cardozo, 106 Cal.App. 506 [39 P. 857]; Witkin, California Procedure,  117, pp. 381-382;  26, pp. 1003-1004.)
 Petitioner's objection is that the foreign administrator (guardian of the estate) lacks the capacity to appear in this action by reason of Code of Civil Procedure, section 1913, which provides "that the authority of a guardian or committee, ... does not extend beyond the jurisdiction of the government under which he was invested with his authority."
 [2] The statute was applied in Mayer v. Willing, supra, 196 Cal.App.2d 379. The court therein (p. 382) quotes from 39 Corpus Juris Secundum, Guardian and Ward, section 190: " 'A guardian has no power, by virtue of his office alone, to sue on behalf of his ward in the courts of a state other than that in which he receives his appointment, but the appointment of an ancillary guardian should be made, or a letter of ancillary guardianship should be granted, in the jurisdiction where the suit is to be instituted. ... As a general rule, the guardian cannot be sued, or appear as a party to a proceeding, outside the jurisdiction in which he received his appointment. ...' " Some so- called "exceptions" to this rule have been made and these are the authorities upon which plaintiff relies. In Lewis v. Adams, 70 Cal. 403, 411 [11 P. 833, 59 Am.Rep. 423], an executrix sued upon a judgment obtained by her as such in the State of Texas. The court pointed out that such judgment would not form the foundation of an action by an ancillary administrator in another state, that, "[a]ccording to the principles recognized by all the authorities, the judgment debt herein sued was a debt at law due to the plaintiff personally, and she was fully authorized to bring and prosecute this action." In Estate of Rawitzer, 175 Cal. 585 [166 P. 581], a foreign executor was permitted to defend an action in its capacity of trustee since in *26 such capacity it had a vested interest in the property of the estate and the power to oppose a petition for sale in the courts of this state. Fox v. Tay, 89 Cal. 339 [24 P. 855, 26 P. 897, 23 Am.St.Rep. 474] (cited by the court in its minute order, in addition to the above two cases), is similar in effect. It was there held that the foreign executors to whom, as trustees, a note and mortgage were given by their coexecutor for the amount of assets received by him belonging to the estate, could maintain an action to recover the trust fund as mortgagees under the terms of the mortgage without taking out letters testamentary in the jurisdiction in which the mortgaged property was situated; that the trust could be enforced indirectly by foreclosure of the mortgage under the rule of equitable estoppel.
 [3a] There are, in the instant case, no such exceptional circumstances presented as will permit the foreign administrator to maintain this action in his personal capacity rather than in his official capacity; nevertheless, in making the orders complained of the trial court acted in the exercise of its jurisdiction and, as hereinafter discussed, was not under a mandatory duty to dismiss the action. If the decision of the trial court is right, the order will not be disturbed merely because given for a wrong reason. (Davey v. Southern Pacific Co., 116 Cal. 325, 330 [48 P. 117].)
 In Mayer v. Willing, supra, 196 Cal.App.2d 379, the matter was presented upon an appeal from a judgment of dismissal, which was affirmed. The within order denying the motion to dismiss is nonappealable, and it is the contention of petitioner that "[t]o delay a review of the denial of petitioner's motion to dismiss until an appeal is taken from a judgment rendered after trial on the merits would be extremely wasteful of the Court's time as well as of the time and money of the parties."
 The Mayer case does not hold that an action maintained by a foreign guardian must be dismissed. We do not know what jurisdictional question was raised in that case, but the court therein specifically stated that it did not determine that question; it determined only that the trial court properly dismissed the action upon the circumstances therein presented. The question presented in the case before this court is whether the provisions of section 1913 of the Code of Civil Procedure, go to the jurisdiction of the trial court. We do not so construe it. By reason of this section such foreign representative is under a disability,--his right to maintain an action in this *27 state involves the question of capacity to sue. (Canfield v. Scripps, 15 Cal.App.2d 642, 646 [59 P.2d 1040]; Mayer v. Willing, supra, p. 382.)
 [4] It has been generally held that legal incapacity to sue does not go to the jurisdiction of the court. (Danziger v. Peebler, 88 Cal.App.2d 307, 310 [198 P.2d 719]; House v. Pacific Greyhound Lines, 35 Cal.App.2d 336, 343 [95 P.2d 465]; Rosenbloom v. Southern Pac. Co., 59 Cal.App. 102, 104 [210 P. 53]; Work v. Campbell, 164 Cal. 343, 349 [128 P. 943, 43 L.R.A. N.S. 581]; Crittenden v. Superior Court, 166 Cal. 340, 345 [136 P. 287].) If objection is not raised by demurrer, answer, or in some other suitable manner, it has been held that the objection will be deemed to have been waived--clearly showing that the matter is not jurisdictional. (Canfield v. Scripps, supra, 15 Cal.App.2d at p. 646; Parker v. Bowron, 40 Cal.2d 344, 351 [254 P.2d 6]; Klopstock v. Superior Court, supra, 17 Cal.2d 13, 17.)
 [3b] However, although the court may have fundamental jurisdiction, it has no authority to disregard the statutory requirement that a minor must appear by a general guardian or guardian ad litem (Code Civ. Proc.,  372; Civ. Code,  42) or to disregard the public policy expressed in Code of Civil Procedure, section 1913, with respect to the incapacity of a foreign guardian. To proceed to trial and judgment in the present posture of this case would be an act in excess of "jurisdiction" which could be prevented by prohibition. (Abelleira v. District Court of Appeal, 17 Cal.2d 280, 287-291 [109 P.2d 942, 132 A.L.R. 715].)
 Were we to consider the within action solely from the viewpoint of an attempt by a foreign guardian to maintain an action as a party plaintiff, dismissal would be proper for, upon the facts stated, there is no cause of action in the guardian personally,--not even an ancillary guardian. But the pleadings show the minor to be the real party in interest. That is the crux of the matter. The manner in which it is captioned is of no vital import. The incapacity of the minor is a matter in abatement which may be cured and a plaintiff should be given a fair opportunity to cure the defect if he can. Dismissal might result in an "irretrievable bar to all remedy" as to the minor (see Cox v. San Joaquin Light etc. Co., 33 Cal.App. 522, 527 [166 P. 578]), whereas no prejudice can be caused to the defendant if amendment of the complaint can be made. Upon application properly made within a reasonable time, the trial court should allow an amendment *28 properly to name the minor as plaintiff, by a guardian ad litem. Such an amendment would make no change in the substance of the action, the only change being to set forth correctly the real party in interest as plaintiff. (See Alvez v. Toprahanian, supra, 39 Cal.App.2d 126, 128-129; Lindsey v. Superior Court, supra, 100 Cal.App. 37.
 The Lindsey case (p. 41) quotes from Nisbet v. Clio Min. Co., 2 Cal.App. 436 [83 P. 1077], and sets forth the spirit of the law upon which we rely: " 'Courts under the reformed system of procedure look to the substance of things rather than to form, and to persons and things rather than to mere names. This manner of treating things constitutes the life and spirit of the reformed system of procedure [citation]. That system was designed to enable courts of justice to brush aside technicalities affecting no substantial right, and decide cases upon the merits.' "
 The alternative writ is discharged and the peremptory writ of mandate to compel the superior court to dismiss the action is denied.
NOTES
[fn. 1]  1. "Date: April- 1-1960 Contract Between Peerless Produce Company, Inc. of Los Angeles California and/or Al Siegel, of Los Angeles California with Rancho Tomasina, of Guaymas Valley, if [sic] Sonora Mexico: Represented by: 1.--Tom Jamison for Tomasina (Owner) of Rancho Tomasina. 2.--Peerless Produce and Al Siegal are Buying One Half Interest, in all watermelons Grown and Harvested, on Rancho Tomasina for the amount of $10,000.00 (Ten Thousand Dollars) 3.--Rancho Tomasina shall finish the crop up to the harvest, of all watermelons. 4.--All Watermelons produced on Rancho Tomasina, shall be sold by Peerless Produce or Al Siegel. 5.--No Brokerage to be charged by Peerless, Except selling expense not to exceed One Dollar per Ton. 6.--The first Ten Thousand Dollars received from the sale of watermelons. By Peerless, or Siegal, shall be paid to Rancho Tomasina after expenses are paid. 7.--Peerless or Siegal shall then receive Twenty Thousand Dollars out of net proceeds. 8.--All expense from begening [sic] of harvest shall be paid out of proceeds from the sale of watermelons. 9.--After all melons are shipped and sold, an accounting shall be made to Rancho Tomasina within approximately thirty days. 10.--After above distributions of money, in that proceeds that are left shall be split evenly; between Peerless and Siegal. With Rancho Tomasina. Signatures for Peerless Produce, Inc. (General Manager) Morris Auster Al Siegal: Al Siegal Rancho Tomasina: Tom Jamison (Owner) Represented by Tom Jamison Witness--B ... (?) Witness--M M ... (?)"
