This action by a real estate broker is before us on exceptions to the overruling of the defendant’s demurrer. There are four counts based on a contract in writing dated March 20, 1946 under which the plaintiff was given the exclusive authority to sell certain real estate. Under its terms *381the defendant agreed to pay a “10% commission on any sale made within-months from the date hereof and until written termination of this agreement.” The plaintiff alleges that he spent money and made a great effort to make a sale. The first count alleges a breach of the agreement in that the defendant sold the property on May 26, 1946 and notified the plaintiff that his agency was terminated. The second count is substantially the same. The third count is the same with an additional allegation that the defendant placed the property in the hands of another broker. In each of these three counts the damages sought are for breach of the contract and are claimed to be $400 or 10% of the selling price of $4,000. The last two counts are substantially the same except that the plaintiff claims to recover a commission of 10% instead of damages for a breach of the agreement.
The defendant demurred and the demurrer was sustained. The plaintiff had omitted to allege, as required by Rev. Stat. 1944, Ch. 75, Sec. 7, that the plaintiff was a duly licensed real estate broker at the time the cause of action arose. The plaintiff, apparently recognizing that such omission made his declarations defective, sought and was given permission to amend. There was no objection to the amendment, but the defendant demurred again and this demurrer was overruled. Exceptions which are now before us were taken to this ruling.
The defendant argues that exactly the same issue was before the presiding justice after the amendment was allowed as before because the amendment was made to the writ and not to the declaration. In other words, he contends that the court cannot read the writ and the declaration together. This seems to be a discarding of substance for form; and, moreover, to sustain such a claim would be contrary to long established practice which treats the writ and declaration as one. Friend v. Pitman, 92 Me., 121, 42 A., 317.
The defendant also claims, if we understand his argument correctly, that the allegation that the plaintiff was a duly *382licensed broker at the. time the cause of action arose was a necessary averment to give the court jurisdiction to hear the case, and that being such a necessary averment the failure to allege it could not be cured by amendment. The case of Gerstian v. Tibbetts (142 Me. —), 49 A., (2d), 227, is cited as authority for such principle. But the defendant gives a broader construction to the language there used than is warranted. Assuming that such allegation does involve the right of the court to consider the case, yet there is no reason why the failure to allege such fact may not be cured by amendment. It may be true that a court without jurisdiction has no authority to allow an amendment. Yet if a court has jurisdiction of the subject matter, it may in such a case as this allow an amendment to perfect the jurisdiction on the record. Merrill v. Curtis, 57 Me., 152. See Perry v. Plunkett, 74 Me., 328, 331; 1 Enc. Pl. & Pr., 511; 49 C. J., 505; 41 Am. Jur., 498.
The defendant’s contention that there was here no binding contract cannot be sustained. We think that a binding contract was set forth which the defendant did not have the right to terminate except as therein provided. We are not here concerned with its termination by operation of law. Rev. Stat. 1944, Ch. 106, Sec. 12.
The defendant also argues that the demurrer should be sustained because there is a misjoinder of counts. Assuming without deciding that this is so, advantage can be taken of such defect only by a special demurrer and the demurrer here is general. If any one count is good, a general demurrer will be overruled. Blanchard v. Hoxie, 34 Me., 376; National Exchange Bank v. Abell, 63 Me., 346. See discussion in Fernald v. Garvin, 55 Me., 414, 417, as to the right to amend for misjoinder by striking out counts.
The demurrer here was properly overruled.
jExceptions overruled.