
    KELLY v. GEBHART et al., Appellants.
    Division One,
    March 17, 1904.
    1. EJECTMENT: Value of Land and Improvements: Notice. Where the value of the land and improvements is fixed at the trial by agreement, notice that such value would be an issue at the trial is waived, and hence the necessity of the offer to relinquish is obviated.
    2. -: -: Extent of Judgment: No Appeal. In strict conformity to the statute, the defendant in ejectment who in good faith has made permanent valuable improvements on land of which he is in possession believing himself to be the owner, can ask for no relief except compensation for his improvements. But if the judgment goes further and ascertains that defendant has an equitable interest in the land to the extent of the value of his improvements (being in excess of the value of the land) and decrees that that interest be sold to satisfy that judgment (which sale of course would carry the plaintiff’s title to the land), and. neither party appeals from that judgment, it can not subsequently be attacked as being not responsive to the pleadings.
    3. -: -: -: Subrogation: Deed of Trust: No Appeal. In a suit for the value of the improvements in ejectment, if the defendant in his petition asks to be subrogated for the value of a deed of trust made by a common grantor which he has paid and the judgment so decrees, ana directs that the land be sold • to satisfy that decree, that judgment, if unappealed from, can not be subsequently attacked, and a sale of the land thereunder carries title, even as between the parties or their privies.
    Appeal from Phelps Circuit Court. — No». L. B. Wood-side, Judge.
    Affirmed.
    
      
      Titos. M. <& Gyrus H. Jones for appellants.
    (1) The sheriff’s deed under which plaintiff claims title recites that the sheriff levied upon all the right, title and interest of Ludwig G-ebhart in and to the real estate. Now, if Ludwig G-ebhart did not have title, then certainly none passed by the sale of the plaintiff (respondent here) and there is clearly an outstanding title in Arthur Corse. This being true plaintiff was not entitled to recover, for it has been expressly held that a defendant may show an outstanding title in a third person to defeat an action in ejectment. Thompson v. Lyon, 33 Mo. 219; Norcum v. D’Oeneh, 17 Mo. 98. It may be contended that Gebhardt had an equitable title which was sold under the execution, but it is certain that under the facts in this case the plaintiff did not have legal title, and not having the legal title to the land, an equitable title is insufficient for recovery. Hunt v. Selleek, 118 Mo. 588; Picket v. Jones, 63 Mo. 195. (2) There is clearly no issue tendered in the pleadings which would warrant the court in admitting the deed of trust in evidence or in rendering the judgment that it did render. The pleadings in this case were not shaped with a view of an equitable defense and do not tender any issue that would warrant the court in the finding that it made. Where the pleadings are not shaped or tender an issue, it is error for a court to render a judgment outside of and not warranted by the pleadings. Cox v. Estes, 68 Mo... 110; Haddock v. Lance, 94 Mo. 283; White v. Rush, 58 Mo. 105; Newham v. Benton, 79 Mo. 382; Daugherty v. Adkins, 81 Mo. 411; Ross v. Ross, 84 Mo. 84; Dunham v. Stephens, 160 Mo. 106. The doctrine is well settled that the court can not base a decree upon a state of facts not set up in the pleadings. Rumsey v. Railroad, 144 Mo. 189.
    
      
      Botsford, Deatherage <& Young for respondent.
    (1) Whether or not the judgment of the lower court in the suit for the value of improvements was in conformity with the provisions of the statutes governing- suits of that nature can not be raised in this suit, because that judgment was made by agreement, in open court, of the parties to that suit. Neither party to that suit can therefore complain of the judgment. Brown v. Appleman, 83 Mo. App. 84. “ A judgment by consent or agreement operates as a waiver of all errors committed before its rendition, except such as would involve the jurisdiction of the court.” 11 Ency. PI. and Pr., 1030; Johnson v. Realty Co., 167 Mo. 325; Bedford v. Sykes, 168 Mo. 8; Pockman v. Meatt, 49 Mo. 345. (2) The case of Shroyer v. Nickell, 55 Mo. 264, is on all fours with this case. In that ease a married woman conveyed her. land to N. Learning after-wards that the deed was defective, she brought a suit in ejectment against N for possession of the property. Held, that though the aforesaid conveyance was void, the court should, while rendering judgment for plaintiff for possession of the land, also award the defendant the value of the permanent improvements put on said land by defendant, together with the purchase money paid by him to plaintiff for said land. Henry v. Mc-Kerlie, 78 Mo. 416; Railroad v. Shortridge, 86 Mo. 665 ; McReynolds v. Grubb, 150 Mo. 365. It is reversible error» for the lower court to strike out on motion an equitable defense in an ejectment suit. Jones v. Manly, 58 Mo. 559. (3) It is the policy of the law to uphold judicial sales and to look with leniency on minor irregularities which do not affect- or prevent substantial compliance with the ends of justice to all parties concerned. Jones v. Manly, supra; Schafer v. Causey, 76 Mo. 365; Plewey v. McKerbie, 78 Mo. 416.
   YÁLLIANT, J.

The original defendant in this suit was Lndwig Gebhart, who has died since the appeal was taken and the present defendants, who are his children and heirs at law, have been admitted as parties in. his stead.

The suit was begun as an action in ejectment for the possession of eighty, acres of land, but by the answer it was converted into a suit in equity.

The averments in the answer were to the effect that in 1889 the defendant Gebhart, by his attorney Kelly, the plaintiff in this suit, brought suit against one Corse to recover the value of certain improvement that he (Gebhart) had placed on the land in question; that Corse answered in that suit by general denial only, and • the cause coming on for trial the court found the value of the improvements sued for to be $1,600, the value of the land independent of the improvements to be $200, rendered judgment against Gebhart for $200 and decreed that execution issue to sell the land to satisfy that judgment; that execution did accordingly issue, the land was sold thereunder by the sheriff to Kelly, the plaintiff in the case at bar, to whom the sheriff delivered a deed. Then the answer avers that that judgment was null and void, and the sale thereunder was void, and prays that the deed be cancelled, etc. Reply, general denial.

On the trial the plaintiff Kelly introduced the following evidence:

1. A judgment of the circuit court dated February, 1887,,in favor of one A. Corse against Ludwig Gebhart for the possession of this 80 acres and $10 damages.

2. A deed of trust dated August, 1887, from Ludwig Gebhart conveying this land to A. S. Long, trustee, to secure a note for $100 to Kelly and J. B. Harrison, and a note for $100 to Kelly, both made by Gebhart, both due August 9, 1888.

3. A judgment of the circuit court dated August 8, 1890, in the words and figures following:

“Ludwig Gehhart v. A. Corse.

“This cause coming on to be heard the parties plaintiff and defendant appear and announce ready for trial, and by agreement of parties the issues are submitted to the court, and by agreement the court finds that the defendant is entitled to the lands described in plaintiff’s petition as follows: South half of the southeast quarter, section thirty-four, township thirty-eight, range seven west, containing 80 acres. That the plaintiff is and has been in the possession of said land, claiming title thereto, since the--day of December, 1880. That the value of said lands, without improvements •made by plaintiff, is $200. That the value of improvements made by plaintiff is $1,600. It is, therefore, decreed by the court that the plaintiff pay defendant two hundred dollars on or before the first day of October, 1890, and that on the payment of such sum of $200 to defendant, A. Corse, on or before the said 1st day of December, 1890, the defendant arid' those claiming under him since the filing of this suit, shall be divested of all title to said lands. That the said $200 'is hereby declared a lien on said land and unless the same be paid within the times above mentioned! and ■specified, execution shall issue by the clerk of this court, ■commanding the sheriff of Phelps county, Missouri, to sell said real estate to satisfy said sum of $200, and •costs of this suit.”

4. A deed from the sheriff to plaintiff Kelly to “the land in suit under execution of that judgment.

The defendant introduced the following evidence:

1. The petition in the suit of Gebhart v. Corse in which the judgment above shown was rendered. That petition was in substance to the effect that in December, 1880, one Louisa Snay, a married woman, sold the land in question to Gebhart for $150 in cash, which he paid to her, and the assumption of payment by him of two notes of Louisa Snay, amounting to $150, owing to one Allen, and secured by deed of trust on the land duly recorded, which notes he afterwards paid; that Louisa Snay and her husband executed a deed to him and put him in possession of the land on December 16, 1880, and he has been in possession of the same ever since; that the deed so given to him was not acknowledged as the law required for the acknowledgment of a deed by a married woman selling her land, a fact of which he was at the time ignorant, and the consequence was that in a suit against him a judgment for .the possession of the land was rendered in the circuit court in February, 1887, in favor of A. Corse who had a better title; that whilst he was in possession and before he had notice of the claim of Corse he made certain specified improvements amounting in value to over $3,000. The prayer of the petition was that an account be taken of the rents and profits of the land while in his possession, and of the value of permanent improvements so made, and of the amount he had paid for the purchase money and interest, that he be subrogated to the rights of Allen in the deed of trust which he had paid off, and that -Corse be enjoined from taking possession of the land until he should pay the amount of the value of the improvements and the purchase money and the Allen debt, less the amount of the rents and profits, etc.

2. The answer to that petition, which was a general denial.

3. The evidence for defendants also showed that the plaintiff Kelly had been attorney for G-ebhart in a criminal suit against him and was his attorney in the suit against Corse for the value of the improvements. That the deed of trust in evidence was given to secure Kelly and Harrison for their fees in the criminal case. Gebhart retained possession of the land throughout all the litigation.

The finding and judgment were for the plaintiff for the possession of the land, bnt the court also found that at the time the plaintiff bought the land at the sheriff’s sale he was the attorney for Gebhart and that that relation fixed a trust character to the title taken; the court found the plaintiff had paid the sheriff $200 for the purchase price, which with interest up to the date of the judgment amounted to $320, and also that there was due the plaintiff from Gebhart on the deed of trust in evidence $345; also that at the time of his purchase the plaintiff executed a deed of trust on the land for $100, which with interest to date amounted to $180. It was adjudged that if the defendant should elect to pay the plaintiff $320, and the $345 above mentioned with six per cent interest by a day named, such payment when made should be a satisfaction of the judgment in plaintiff’s favor for possession of the land, and that if defendant should pay the $180 deed of trust such payment should go as a credit against the amounts to be paid to plaintiff, and upon such payments the plaintiff should execute a deed to defendant for the land. Prom that judgment the defendant appealed.

The proposition on which the defendants mainly-rely is that the judgment in the suit of Gebhart v. Corse was null and void because it was not responsive to the pleadings; therefore, the sheriff ’s deed under the execution was invalid; and that deed being the only show of legal title in the plaintiff, he was not entitled to recover.

Appellants’ analysis of the judgment is that it adjudges the land to belong to Corse, Corse to recover of Gebhart $200, and Corse’s own land to be sold to pay the debt Gebhart owes him. We think that is a misconception of the judgment.

The effect of the judgment is that whilst the legal title to the land is in Corse, yet Gebhart has an equitable interest in it to the extent of $1,600, and it is that interest that is decreed to be sold to satisfy the judgment of $200 in favor of Corse, and since the sale is for the benefit of Corse, it of course carries Corse’s title also.

Appellants contend that that was a proceeding’ under the statute, sections 3072-3079, Revised Statutes. 1899, and that no judgment could be rendered except as-, in the statute prescribed; that in that case no judgment for the value of the land could go against G-ebhart, the plaintiff there, because Corse in his answer had not offered to relinquish the land upon payment to him of the value thereof as prescribed in section 3075.

In Cox v. McDivit, 125 Mo. 358, which was a case under this statute, the judgment required the plaintiff to pay the value of the land and take a deed therefor from the defendant, and in default of such payment the defendant was to have the land discharged of the claim for improvements. That judgment was reversed by this court on appeal for the reason that the defendant in his answer had not offered to relinquish the land and take the value thereof as provided in section 3075, the court holding that such an offer was necessary in order to give notice to the plaintiff that the value of the land would be a question at the trial. But as was recognized in that case, the giving of such notice may be waived, and if waived, the necessity of the offer to relinquish is obviated. The record in the case of Gebhart v. Corse shows that the value of the land and that of the improvements was fixed at the trial by agreement of the parties and assessed by the court according to the agreement; notice, therefore, that the value of the.land would be in issue at the trial was waived.

Whilst it may be that the plaintiff in that suit aimed to bring his .case within the terms of the statute above referred to, yet an examination of his petition shows that he did not confine himself strictly to the statute, but injected into his petition some statements tending to show that he had an equitable interest in the land superior to the defendant’s legal right, and he prayed judgment thereon.

The statute in question, section 3072, is designed to enable one who, in good faith, has made permanent valuable improvements on land of which he is in possession and believes he is the owner, to have compensation for such improvements when he is dispossessed by one holding a better title. In such case he may file his petition (section 3073) -stating the nature of his title, the length of his possession, the kind and value of the improvements, his good faith, etc. In strict conformity to the statute the only relief he can ask is compensation for his improvements. But in Gebhart v. Corse the plaintiff went beyond the strict limit of the statute and set up in his petition the deed of trust to Allen which he stated was senior to Corse’s title, and which he had paid under the terms of his purchase from Louisa Snay, and he prayed to be subrogated to Allen’s rights. If, therefore, the judgment in that case did not conform strictly to the statute it was no farther wide of the mark than was the petition. The court had jurisdiction both of the parties and the subject and was competent to adjudge between the parties their rights respectively in relation to the subject in controversy as set out in their pleadings. This the court, by its decree, undertook to do, and if there is anything wrong about the judgment it is only an error which either party, if he felt aggrieved, could have had corrected in the proper appellate court. But both parties seem to have been satisfied, there was no appeal taken, there was not even a motion for a new trial. Under those circumstances the judgment is to be taken as valid and conclusive between the parties, and as to them the legal title to the land passed under the sheriff’s sale. The court correctly adjudged the title to be in the plaintiff Kelly, and also correctly held that as he was the attorney for Gebhart his title was impressed with a. trust in Gebhart’s favor, and that Gebhart was to have the land when he should pay Kelly what he honestly owed him. The date at which the rights of Kelly and Gebhart respectively with ref erence to the land, growing ont of Kelley’s purchase at the sheriff’s sale, were to be adjudged, was the date of that sale. At that date the debt due under the deed of trust was in full force.

The decree gave Gebhart all that he was entitled to and his heirs have no cause to complain of it.

The judgment is affirmed.

All concur.  