The first question to be considered is, Do secs. 30, 31, 32 and 33, ch. 141, R. S., apply to actions brought to recover an undivided interest in land, so as to give a tenant in common, who has been defeated in an action to recover possession of such undivided interest, a claim against his cotenant for his improvements in whole or in part ? The question is fundamental in this case, and was not discussed upon the first argument. In our examination of the cause, we had some doubt whether the statute did not restrict the right to cases where there was a recovery of the possession of *610tbe whole estate, and therefore a reargument of the question was ordered, whether it applied to a case where there was a recovery of an undivided interest only. The plain intent of the statute is to secure to a bona fide possessor of land, on a recovery against him in an action of ejectment, compensation for his improvements; but the statute needs further legislation to carry out in all cases the equitable principles upon which it is founded. Cases do and will often arise, where it would be difficult and unjust to apply its provisions; as where the plaintiff in ejectment claims and recovers an estate less than the fee, as an estate in dower, or for life, or for a term of years. In such cases it is manifestly unjust to impose upon the plaintiff the entire burden of the improvements; but the statute makes no provision for bringing in other parties so as to enable a full and just adjustment of the expense of the improvements to be made between all parties interested in the estate and benefited by them. As it now stands, the statute is defective and urgently needs amendment. And in the case before us, while we are inclined to hold that the statute applies to an action to recover an undivided interest in the land, still, the power of the court to apportion the expense of the improvements between the tenants in common according to their respective interests, is one arising by implication rather than conferred by express grant, as it should bo. Rut while the matter may not be beyond the reach of the court under the statute, yet it must be confessed that the way is not very clearly pointed out or provided, as it easily might be by the legislature, for adjusting the rights and equities of the parties, where one tenant in common has in good faith made beneficial improvements on the estate.
The learned counsel for the plaintiffs in ejectment claims that the reason and. policy of the statute fail in the case of a recovery of an undivided interest, because, he says, the defendant surrenders nothing, but only shares the possession of the improved estate with his cotenant, and, in an action for *611a partition, can secure compensation for improvements made by him. Rut a court of law, proceeding under the partition statute, is inadequate to make a full and just adjustment of the expenses of the improvements; though it would be otherwise in a court of equity. See Story’s Eq. Jur., §§ 655 et seq. Still, the question is, Does the betterment statute give one tenant in common, after a recovery- against him by his co-tenant of an undivided interest, the right to compensation for valuable improvements made in good faith upon the common estate? We have already indicated the opinion that it did, and that the court, under the sections first referred to, had power to apportion the expense of the improvements according to the interest of the parties. . There is, doubtless, an inherent difficulty, or rather inaccuracy, in saying, in such a case, that the improvements have been made on the lands recovered, because, in fact, only an undivided interest is recovered in the common estate upon which the improvements are made. Rut the intent of the statute, if manifest, must prevail, however inaccurately it may be expressed in the language used. Under sections 15 and 16, where the plaintiff in ejectment recovers any estate, share or interest in land, the. defendant has the right to set off permanent improvements made on the premises against the plaintiff’s damages for the unlawful withholding, including the mesne profits; and these provisions were held in Davis v. Louk, 30 Wis., 308, to apply to a case where there was a recovery of an undivided interest by one tenant in common against his cotenant. There the value of the improvements was apportioned according to the rights and interests of the respective parties, and this court thought the statute sanctioned such an equitable adjustment. That case, as far it goes, is strongly in favor of a construction of secs. 30, 31, 32 and 33, which gives a tenant in common his claim for improvements against his cotenant. ' And such construction derives support from the last clause of sec. 31, which provides - that if thq jury “find *612that tbe jffaintiff is entitled to recover any sum for or on account of such improvements, judgment shall be rendered for such sum as they shall so assess and award.” Therefore, taking the various sections of ch. 141 together, considering the object and spirit of the provisions relating to the claim of improvements made by the party in possession “ in good faith and in the mistaken belief that he had acquired a title from the rightful owner ” (2 Kent, 334), we feel warranted in holding that they apply to actions for an undivided interest in land. See, also, Blodgett v. Hitt, 29 Wis., 170.
In this case the counsel do not agree as to the proper construction and effect to be given the claim for improvements, and as to whether it is made under secs. 30, 31 and 32, or under sec. 33. They substantially agree, however, in the position that the proceeding taken to enforce the claim is in the ejectment suit, and is not an independent action instituted for that purpose. If the claim is made under secs. 30, 31 and 32, the practice to be adopted, as well as the time for making the claim, are fully pointed out in Thomas v. Rewey, 36 Wis., 328, and Scott v Reese, 38 id., 636. In the former case the chief justice says: “Upon careful consideration of all the provisions of the sections in question, we hold that the claim of the defendant in ejectment must be made either before judgment upon the verdict, or at latest within the term at which the judgment is rendered, and while the judgment remains under the control of the court. We do not pass, in this case, upon the question, whether the claim must not be made before judgment. But we hold that, when judgment has been rendered on the verdict, and the term of the court has ended, it is too late for the defendant to recall the cause and the plaintiff to the court, by this supplemental proceeding; and that what is done after the term of judgment cannot be considered as done forthwith after verdict.” In Scott v. Reese, it was held “ that the claim and the issue upon it must not only be made, *613but that the issue must he tried, before any judgment should be rendered in the ejectment.” p. 639.
If it is sought to enforce the claim in the ejectment suit under section 33, then, in analogy to the rule laid down in Thomas v. Rewey and Scott v. Reese, the proceeding for that purpose must be taken subsequent to the verdict and before judgment. Sec. 33 also provides that in all cases where a recovery is had 'of lands on which the party in possession, or those under whom he claims, holding adversely by color of title asserted in good faith, founded on descent or any written instrument, shall have made valuable improvements, such party shall have a lien on such real estate for the value of such improvements. This lien may be enforced in an independent action, so long as the property is owned by the plaintiff in ejectment and the statute of limitations has not run upon it. It is analogous to a vendor’s lien for purchase money, and liable to be cut off by a sale of the ^property, for a valuable consideration, -to a purchaser without notice of it. The same section further provides that the lien may be enforced in the ejectment suit itself by a supplemental proceeding, as in the case where recovery is had against a party claiming title under a tax deed. Such was the proceeding confessedly taken here, being a proceeding in the action of ejectment; and we must therefore hold, in accordance with the rule laid down in Thomas v. Rewey and Scott v. Reese, that it was taken too late. It is true, the section is silent as to when the jury shall be summoned to assess and ascertain the value of the improvements; but it is clearly implied that it must be done while the court has control of the ejectment suit. It is said the demurrer should be considered as to the whole complaint as amended, and that it appears that no final judgment has-yet been rendered in the ejectment. This position is clearly not supported by the record. It does- appear beyond all controversy that final judgment was rendered in the action *614of ejectment long before tins supplemental proceeding was instituted. Such being tbe case, tbe court bad lost jurisdiction of tbe persons of tbe plaintiffs in tbe original suit, as well as all jurisdiction of tbe action of ejectment, and bad no power to entertain it for any j urpose. These remarks dispose of tbe case.
It follows from these views that tbe order of tbe circuit court overruling tbe demurrer must be reversed, and tbe cause must be remanded for further proceedings in accordance with this decision.
By the, Court. — So ordered.