MR. JUSTICE BROWN, after stating the case, delivered the opinion of the court.
When the railway company became the purchaser at judicial sale of the property, assets and franchises of the railroad company, it found the latter in possession of a tract of land upon Bloody Island in the Mississippi River, making use of the same for its tracks, depots, warehouses and other terminal facilities, and also sending to and receiving from St. Louis at this point its passengers and freight by steamers not its own. It knew, or was bound to know, that this property did not belong to the railroad company. As the record shows that it remained in possession of these premises for the next fourteen years, using the same for some nine years of this time as they had before been used, sending its passengers and freight to and from St. Louis in the boats of the ferry company, and, in the language of the answer, "treated the contract as in full force and binding upon them," it must be assumed that it was fully informed of the ownership of such property, and the terms of the contract under which it was held and employed by the railroad company.
(1) Under these circumstances what was the legal relation of the railway company to this contract? In a case between these same parties, (94 Illinois, 83,) the Supreme Court of Illinois held that the covenants contained in the contract of April, 1858, were not such as ran with the land, and that the relationship of landlord and tenant was not created by such contract between the ferry company and the railroad company. Indeed, the fact that the railway company and its receiver continued in the occupation of this property for over seventeen years, with the tacit consent of the ferry company, and without any suggestion of a tenancy or a demand for rent, is sufficient of itself to show that the relations between them were not those of landlord and tenant. Such relationship will never be implied when the acts and conduct of the parties are inconsistent with its existence. In Carpenter v. United States, 17 Wall. 489, 493, it was held by this court that no reason for the implication of a tenancy existed, "when an express contract or an arrangement between the parties shows that it was not intended by them to constitute the relation of landlord and tenant, but that the occupation was taken and held for another purpose." In that case, it was shown that the entry had been made in pursuance of an agreement to purchase, and it was held that the tenant was not liable for use and occupation if the purchase were actually concluded.
The railway company was not the formal assignee of the interest of the railroad company in such a contract, nor could it become so under the eighth clause of the contract, without the consent of the ferry company. It is a well-established principle that the mere purchase of a railway under a foreclosure sale by a new corporation does not of itself make such new corporation liable for the obligations of the old one. Stewart's Appeal, 72 Penn. St. 291; Vilas v. Milwaukee &c. Railway, 17 Wisconsin, 497; Smith v. Chicago & Northwestern Railway, 18 Wisconsin, 17. The railway company, then, upon taking possession of the property of the railroad company, was at liberty to renounce the benefit of such contract, if it chose to do so, or to make such further arrangement with the ferry company as they might be able to agree upon. It did neither, but still maintained possession of the land. In view of the fact that the railway company used this property precisely as it had been used; improved it at great expense, by filling up low places and securing it from the overflow of the river; graded and paved the river front, erected buildings, paid the annual taxes, and, until 1871, employed the ferry company to transport its passengers and freight to and from the city — in short, in the language of the answer, doing and performing "all that the terms of the said contract required the said Ohio and Mississippi Railroad Company to do and perform," we think it must be held in a court of equity to have adopted such contract, and made it its own. This construction certainly consorts with the acts and conduct of both parties, between whom different modifications of the contract were proposed and discussed at different times from 1872 to 1875. Under the circumstances of this case, we agree with the conclusion of the special master, that the railway company acquired an equitable estate in the premises, of like character as the legal estate previously held by the railroad company, which estate was in equity unimpeachable, and that the railway company and the ferry company sustained the same relation as had previously existed under the deed between the railroad company and the ferry company; or, at least, that both parties are equitably estopped from denying that such was the case. It is not necessary that a party should deliberately agree to be bound by the terms of a contract to which he is a stranger, if, having knowledge of such contract, he deliberately enters into relations with one of the parties, which are only consistent with the adoption of such contract. If a person conduct himself in such manner as to lead the other party to believe that he has made a contract his own, and his acts are only explicable upon that theory, he will not be permitted afterwards to repudiate any of its obligations. 2 Pom. Eq. Juris. sec. 965; Chicago & Alton Railroad v. Chicago &c. Coal Co., 79 Illinois, 121. This principle is applicable here, and it results from this that, if the railway company or its receiver has been guilty of a breach of this contract, the petitioner is entitled to recover its damages, by reason of such breach, in this proceeding, unless it has in some way become estopped by the judgments of the state courts of Illinois, or by its own conduct and disclaimers in this suit.
The first action between these parties was brought in 1874, in the St. Clair Circuit Court, and was determined upon a demurrer to the declaration, which alleged a breach of the third covenant of the contract in this, that in November and December, 1873, the defendant wrongfully and without plaintiff's assent, brought to its railroad in East St. Louis and its said depot across the Mississippi River, from the city of St. Louis, in its cars, certain loads of grain to be transported eastwardly on its railroad, and caused said grain in said cars to be transferred across said river, from St. Louis to its depot at East St. Louis, by way of Venice, a village two miles above East St. Louis, on a rival ferry, and also caused certain carloads of coal to be taken in its cars, from East St. Louis, by way of Venice, and thence across the Mississippi River to the city of St. Louis, on said rival ferry. As the contract, which was set out in hœc verba in the declaration, provided that the railroad company should employ the ferry company to transport across the river all persons and property which might be taken either way by the railroad company "to or from Bloody Island," there was an apparent variance between the contract and the breach alleged in the declaration, in bringing to its depot in East St. Louis the property in question. A demurrer was interposed to this declaration and sustained, and final judgment entered in favor of defendant, an appeal taken to the Supreme Court, and the case affirmed. 72 Illinois, 360. In delivering its opinion, the Supreme Court held that the contract was confined in its operation to the territorial limits of Bloody Island, and that there was nothing in such contract, unless it arose by implication, that prevented the railway company from extending its tracks to Venice, or any other point, however distant, and crossing passengers and freight there for St. Louis or points beyond. The court in that case seems to have assumed that the railway diverted its passengers and freight from Bloody Island altogether, by sending them across the river from points above and below the island. But there is nothing in this decision which estops the ferry company from showing that the railway company did in fact send them to its depot upon Bloody Island, and from there diverted them by tracks of other roads to ferries above and below said island, as was actually the case, and thereby defrauded petitioner of its rights under the contract. If, as a matter of fact, the diversion complained of began after the arrival of the freight at the grounds of the ferry company upon Bloody Island, a different case is presented from that passed upon in this opinion. All that was actually decided was that the ferry company had no right to complain, if the railroad company sent its freight across the river from other points than Bloody Island; and the estoppel extends no farther than this. Where the judgment in the former action is upon demurrer to the declaration, the estoppel extends only to the exact point raised by the pleadings or decided, and does not operate as a bar to a second suit for other breaches of the same covenants, although if the judgment be upon pleadings and proofs, the estoppel extends not only to what was decided, but to all that was necessarily involved in the issue. Wash. & Alexandria Packet Co. v. Sickles, 24 How. 333; S.C. 5 Wall. 580; Gould v. Evansville &c. Railway, 91 U.S. 526; Boyd v. Alabama, 94 U.S. 645; Russell v. Place, 94 U.S. 606, 608; Morrell v. Morgan, 65 California, 575.
The second action was brought in 1876, in the same court, against the railway company as assignee of the railroad company, also upon the covenants contained in the third clause of the contract, and, like the former, was disposed of upon demurrer to the declaration, which sought to charge the defendant as the legal representative and assignee of the railroad company in said contract. The Supreme Court (94 Illinois, 83) affirmed the judgment of the court below sustaining the demurrer to said declaration, upon the ground that the covenant that the railroad company would always employ the ferry company to transport for it all persons and property across the Mississippi River, was not a covenant running with the land. The opinion states that "the suit is against one corporation averred to be the assignee of another, upon a covenant made by the alleged assignor. There is no express undertaking, averred in the declaration, by the assignee to perform the covenant of the assignor, nor is there any averment therein from which such an undertaking can be held to be legally implied. The only ground upon which there can be any reasonable pretence to base an argument in favor of the right to recover is, that the covenant is one which in legal contemplation runs with the land, and it will, therefore, only be important to inquire whether this is such a covenant." The opinion then discusses the requisites of such a covenant, the nature of the grant to the railroad company, and holds that such covenants did not create the relation of landlord and tenant, but only an easement, which was not for life, for years or at will, but was a freehold of inheritance, answering to the accepted description of a base or qualified fee. It also held that the covenant sued on was not one the performance or non-performance of which affected the nature, quality or value of the property demised; the easement granted being in the two parcels of land, not in the ferry, while the covenant was purely a collateral covenant affecting the ferry only, and, therefore, not one running with the land. The decision was carefully guarded, the court observing that it was not pertinent to inquire whether the appellants had a remedy in equity, or in some other action at law, and that the decision went no further than the matters specially noticed. The case, which was determined solely upon common law principles, is no estoppel to an equitable proceeding like this to obtain compensation for the use and enjoyment of the petitioner's property.
The most serious obstacle in the way of doing substantial justice in this case arises from the attitude assumed by the petitioner throughout the entire proceedings in the Circuit Court, that it was entitled to recover the rental value of the premises in question. Up to the time of the appeal to this court, the litigation was conducted solely upon this theory. The original petition contained no reference to the contract of 1858, nor any claim on the part of the ferry company that performance of the covenants for ferriage was the consideration for the use of the land in question. It averred simply that the railway company, with the consent of the petitioner, took possession of the lands owned by it, and, by the sufferance and permission of the petitioner, used and occupied the same without any special agreement for rent, and sought to charge the company for the value of such use and occupation, and to enjoin the receiver from removing the tracks and other property belonging to or attached to the freehold, upon which petitioner claimed a lien. While the amended petition set forth the contract of 1858, the possession of the premises by the railroad company, and the purchase and entry into possession by the defendant under the covenants of the contract, it assumed that the judgment of the Supreme Court in the first case above mentioned, estopped the receiver from setting up or claiming that either he or the railway company ever held said premises under or by virtue of said contract; averred that neither he nor the railway company had paid petitioner anything for the occupation of said premises; claimed that it was entitled to receive a reasonable and just compensation for such use and occupation during the time the premises were held by the railway company or the receiver; and prayed for such just and reasonable compensation for the use and occupation, as well as an account of all property and material removed from the premises, and for general relief. Even after the master had reported his opinion that the estate conveyed by the deed of 1858 was determined, and that an equitable estate of like character as the legal estate which had existed by virtue of the deed was created, and that the railway company was under equitable obligation, so long as it held the premises, to perform the covenants forming the consideration of the grant, and had recommended a reference to ascertain the equitable compensation to which the petitioner was entitled, the ferry company refused to act upon such recommendation, and excepted to the report upon the ground that the master failed to find that the relation of landlord and tenant existed between the petitioner and the railway company. In view of these facts and of the persistency with which it has pressed its claim for rent, and repudiated its right to recover under the contract, it would have no just cause of complaint if this court refused to permit a change of front, and affirmed the decree of the court below. Did this disposition of the case involve anything less than a total and final denial of any right whatever to compensation for the use of this property, it might be proper to do this. There is much to be said, however, in favor of the equity of petitioner's claim to an equivalent for the benefit the defendants have received from the use of this property, and we do not consider it beyond the power of this court, upon broad principles of justice, to refer this cause back for such further proceedings as are permitted by the rules and practice of courts of equity.
When the facts of the case show the plaintiff to have an equitable title to relief, this court, while it may be unable to afford such relief upon the case made by the bill, has in several instances asserted its power to remand the case to the court below for an amendment of the pleadings and such further proceedings as may be consonant with justice. In Crocket v. Lee, 7 Wheat. 522, plaintiff filed a bill to obtain a conveyance of land covered by a certificate of settlement right, the legal title to which was in the defendant, and he was decreed by the court below, in conformity with another bill filed by the defendant, to convey to the defendant the land covered by his patent. It was contended in the Supreme Court that the defendant ought not to be allowed to recover on his cross-bill by reason of his failure to make the proper averments with respect to the invalidity of the plaintiff's title. The court adopted the view of the appellant in this particular, but remanded the case with directions to permit the parties to amend their pleadings. In Watts v. Waddle, 6 Pet. 389, this court affirmed the decree of the Circuit Court refusing the specific execution of a contract, but, after reviewing the evidence in detail, it further ordered that to give relief for the rents and profits of the land in controversy, the decree of the Circuit Court, dismissing the bill, should be opened, and the case remanded for further proceedings in conformity with law and justice. In delivering the opinion of the court, Mr. Justice McLean observed that "a new ground of relief has been assumed in the argument here that was not made in the Circuit Court, which is, that although this court should be of the opinion that a specific execution of the contract ought not to be decreed, still the complainants are entitled to a decree for the rents and profits of the land, while it was in the possession of the defendants... . There is no rule of court or principle of law, which prevents the complainants from assuming a ground in this court, which was not suggested in the court below; but such a course may be productive of much inconvenience and of some expense." So in Parkhurst v. Van Cortlandt, 1 Johns. Ch. 273, where possession had been taken of land, and improvements made, under an imperfect agreement for purchase, though the court would not grant relief upon the ground of part performance, yet the bill was maintained for the purpose of affording the party reasonable compensation for beneficial and lasting improvements. See also Walden v. Bodley, 14 Pet. 156; Neale v. Neales, 9 Wall. 1; Hardin v. Boyd, 113 U.S. 756.
In the case under consideration, while the prayer of the petition is for compensation for use and occupation, its present claim for an assessment of damages under the contract is not inconsistent with the allegations of the petition, which are, that "the railway company, defendant, after taking possession of said premises, as aforesaid, observed and kept, until the summer of 1871, some of the covenants of said contract, which were to have been kept and performed by its said predecessor in the ownership of said line of railroad, ... and thereby induced your petitioner to believe, and it did believe, that said railway company had adopted said contract as its own, and that it would continue to observe and keep the covenants thereof which were to have been kept and performed by the said railroad company, and that by reason of its having taken possession of said premises, and held, used and occupied the same as aforesaid, it thereby became and was legally bound, as the successor of said railroad company in the ownership of said line of railroad, to keep and perform the covenants of said contract," etc. It then alleged the failure and neglect to employ petitioner to do its ferriage, and that it "totally ignored and repudiated said contract, and denied any and all obligations to carry out any of the covenants," etc., and averred a loss of profits thereby in the sum of $150,000. We have shown that the inference it draws from all this, namely, that it is entitled to have a just and reasonable compensation for the use and occupation of said premises, is untenable, but it does not necessarily follow that it is wholly remediless. Rules of pleading are made for the attainment of substantial justice, and are to be construed so as to harmonize with it if possible. A mistaken view of one's rights or remedies should not be permitted wholly to defeat a claim founded upon principles of equity and justice, and if the pleadings can be so amended as to admit proof of such claim, and such amendment does not introduce a new cause of action, though it may set up a new measure of damages, or work a real hardship to the party defendant, it is within the discretion even of the appellate court to permit such amendment to be made. Schooner Anne v. United States, 7 Cranch, 570.
(2) We agree with the court below that the petitioner is not entitled to recover the value of the rails removed by the receiver from the premises upon Bloody Island. They were laid there under a mere easement granted by the petitioner, and obviously with no intention that they should become part of the realty. As between landlord and tenant, or one in temporary possession of lands under any agreement whatever for the use of the same, the law is extremely indulgent to the latter with respect to the fixtures annexed for a purpose connected with such temporary possession. It is incredible that it could have been the intention of the parties that the rails and switches laid upon this ground by the railroad company should become the property of the landlord, when, by the terms of the contract, the ferry company had the right to put an end to it at any time upon six months' notice. In Van Ness v. Pacard, 2 Pet. 137, it was held that a house built by a tenant upon land, primarily for the purpose of a dairy, and incidentally for a dwelling house for the family, did not pass with the land. The earlier authorities are reviewed in that case by Mr. Justice Story, and the conclusion reached, that whatever is affixed to the land by the lessee for the purpose of trade, whether it be made of brick or wood, is removable at the end of the term. Indeed, it is difficult to conceive that any fixture, however solid, permanent and closely attached to the realty, placed there for the mere purposes of trade, may not be removed at the end of the term. In the case of Wagner v. Cleveland & Toledo Railroad, 22 Ohio St. 563, it was held that stone piers built by a railroad company as part of its road on lands over which it had acquired the right of way, did not, though firmly imbedded in the earth, become the property of the owner of the land, as part of the realty; and that, upon the abandonment of the road, the company might remove such structures as personal property. So in Northern Central Railroad v. Canton Co., 30 Maryland, 347, it was held that the rails fastened to the road-bed of a railroad, as well as the depots and other buildings, might, under certain circumstances, be treated as trade fixtures, and removable by the company, if the surrounding circumstances showed that at the time the rails were laid upon the land it was not intended that they should be merged in the freehold. In that case the road was built upon land under a license and permission of the owner. It is entirely clear that the rails in the case under consideration did not become part of the realty, and that the receiver was not guilty of waste in removing them from the land.
But for the reasons above stated, and under the peculiar and exceptional circumstances of this case, we think the decree of the court below should be
Reversed, but without costs, and the case remanded for such further proceedings as may be consonant with justice and in conformity to this opinion.