
    Philip H. Fletcher, Appellee, v. Samuel R. Kelly et al., Appellees, and Mary M. Kelly et al., Appellants.
    1. Mortgages: leasehold: fixtures: chattel mortgage: prioritv of liens. Where a brick-veneered structure, three stories and an. attic in height, with slate gables and an iron shingle roof, and costing-seventeen thousand dollars, was erected on leased ground, the foundation being laid on top of the ground on large stone footing, and having water and sewer pipes running under the building; and it appeared, that the building was commenced by the lessee with the expectation of receiving a deed to the land, but being refused a deed he accepted a lease of the land for twenty years, which required him to maintains upon the premises a good, substantial building for use as an hotel and eating house, and under -which said buildings could not be removed without the consent of the lessor, held, that said building was a part of the real estate, and that a mortgage given by the lessee upon said premises as real estate covered the lessee’s interest in the land and the buildings thereon, and was superior to a prior chattel mortgage upon the buildings, and recorded as such, but of which the real estate mortgagee had no actual notice.
    3. -: -: mechanic's lien for improvement. The lien of said mortgage attached also to an addition to said building, built five years afterwards in like manner, and was superior to a mechanic’s lien for materials furnished forbuilding such improvement.
    3. Action on Contract Providing for Attorney Fees: affidavit: withdrawal of attorney. Where an action to foreclose a mortgage, providing for an attorney’s fee, was begun by an attorney who filed with the original papers a proper statutory affidavit for an attorney's fee, but who afterwards withdrew from the ease, held, that it was proper for other attorneys who succeeded him to file a similar affidavit, which should be regarded as an amendment to the first one, and that the allowance of a fee to such attorneys could not be objected to on the ground that their affidavit was not filed with the original papers in the ease.
    4. Appeal: errors not affecting appellant. Errors which affect only defendants who have not appealed can not be complained of by defendants who do appeal.
    •£>. Mechanic's Lien: prior chattel mortgage: priority: recording. The holder of a mechanic’s lien is not a “subsequent purchaser” within the meaning of section 1941 of the Code, which declares that no instrument affecting real estate is of any validity against subsequent purchasers in good faith, unless recorded. Consequently, such a lien is junior to that created by a prior chattel mortgage of the buildings on which the lien is claimed, though such mortgage be regarded as an instrument affecting real estate, and yet is not indexed or recorded in the books pertaining to real estate mortgages.
    
      Appeal from O’Brien District Court. — Hon. Scott M. Ladd, Judge.
    Tuesday, May 23, 1893.
    Action for the foreclosure of a mortgage against it leasehold.. The facts are stated in the opinion of the court. From a decree adjudging the plaintiff’s mortgage a first lien upon the property, certain of the defendants appeal.
    
    Affirmed.
    
      
      J. A. Stocum and J. L. E. Peck, for appellant, Mary M. K. Judd.
    All parties were held to know the extent of S. R. Kelly’s interest, and that it was a leasehold interest and that he was a tenant. A notice of a lease is notice of all the covenants and provisions contained in it. Having notice of its existence, all parties are chargeable-with notice of all its contents, tjones on Real Estate-Mortgages, section 593; Taylor v. Btibbert, 2 Vesey,. 437; George v. Kent, 7 Allen (Mass.), 16; Pike v. Goodenoto, 12 Allen (Mass.), 472; Martin v. Caudle, 72 Ind. 67. When once conceded that the hotel building is-personal property, it establishes the chattel mortgage of Mrs. Judd as the superior lien. For a criterion by which to determine whether an immovable fixture is-personal property or real estate, see Teaff v. Hewitt, 1 Ohio St. 530; Potter v. Cromwell, 40 N. Y. 296; McCrea v. Bank, 66 N. Y. 489; Ottumwa Woolen Mills v. Hawley, 44 Iowa, 59, One who purchases fixtures-with a view that they shall be annexed to, or placed in, a building of which he is the owner, and who executes a chattel mortgage on the property fixtures, thereby evinces his intention that the property shall retain its-character as personalty, regardless of the manner in which it may be annexed to the freehold. Eaves v. Estes, 10 Kan. 314; Ford v. Cobb, 20 N. Y. 344; Bisson v. Hibbard, 75 N. Y. 542; Tifft v. Horton, 53 N. Y. 377. When buildings and other trade fixtures are erected upon real estate upon the faith of an implied license from the owner, they will not be treated in equity as a part of the realty, in the hands of a subsequent purchaser who acquired his title with full knowledge of such license. Walgus v. Gettings, 21 Iowa, 177. Although it is a general rule that a building permanently annexed by the builder with his own money, for his own exclusive use, as disconnected from the use of the land, and with an agreement to that effect between the owner of the land and the builder, will, as between the parties, be considered as personal property. District Township of Corwin v. Moore-head, 43 Iowa, 466; Curtis v. Hoyt, 19 Conn. 154; Fuller v. Taylor, 39 Me. 519; Bringholff v. Munzenmaier, 20 Iowa, 513. When a person claims under a deed which by its recitals leads him to other facts affecting the title, he is presumed to know such facts. TEtna Life Ins. Co. v. Ford,'89 111. 246; United States Mortgage Co. v. Gross, 93 111. 483; Hassy v. Vinache, 1 McCrary, 213; 1 Jones on Mortgage, section 596. Possession by one who is not the owner of record is a fact which should induce one proposing to purchase or take a mortgage to inquire whether the possession is founded on any title. It is notice of the rights of the occupant, whatever they are. Truesdell v. Ford, 37 111. 210; Brown v. Gaffney, 28 111. 149; Doyle v. Stevens, 4 Mich. 87; Farmers’ Loan Co. v. Malthy, 8 Page (N. Y.), 361; Groff v. Bamsey, 19 Minn. 44. Such possession is also held to be notice of a collateral .agreement held by the tenant relating to the property. Kerr v. Day, 14 Penn. 112. Where one person by the permission of another erects a house upon that other party’s land, such building will, if the builder have no estate in the land, be the personal property of the builder. Aldrich v. Parson, 6 N. H. 555; Osgood v. Howard, 6 Greenleaf, 452; Bussell v '. Bichards, 1 Par. 429; Ashum v. Williams, 8 Pick. 402; Bogers v. Woodbury, 15 Pick. 156; Washburn on Real Property, section 3; Eastman v. Foster, 8 Mete. 26; Ogden v. Stoch, 34 111. 522. The permanency of attachment, and its character in law does not depend so much upon the degree of physical force with which the thing is attached, or the manner of its attachment, as upon the motive and intention of the party attaching it. It must usually depend on the express or implied understanding of the parties concerned. Coleman v. Stearns, 38 Mich. 40; Crippen v. Morrison, 13 Mich. 23; Adams v. Lee, 31 Mich. 440; McAuliffe v. Mann, 37 Mich. 539; Jones v. Chair Co., 38 Mich. 92; Robertson v. Corsett, 39 Mich. 777; Ingersoil v. Barnes, 47 Mich. 104, 10 N. W. Rep. 127; Ferris v. Quimby, 41 Mich. 202, 2 N. W. Rep. 9; Wheeler v. Bedell, 40 Mich. 696; Manivaring v. Jenison, 27 N. W. Rep. 899. 'The rule of construction in favor of fixtures retaining their personal character is much stronger as between landlord and tenant than between heirs and executors or vendors and vendees. Ottumwa Woolen Mill Co. v. Haiuley, 44 Iowa, 59; Adams v. Beadle, 47 -Iowa, 439; Denham v. Sanke, 38 Iowa, 269; 2 Kent Com. [8 Ed.], 409; Snoivdon v. Craig, 26 Iowa, 156. The mere fact that a building is upon leased land does not constitute it a part thereof. Nigro v. Hatch, 11 Arizona Rep. 177; Docking v. Frasell, 17 Kan. 160; Kile v. Giebner, 7 Pa. 154. Kelly has no right or interest whereby he can acquire the realty by a payment therefor. His interest lacks the element that connects the title of the person.alty with the realty. Where by agreement between landlord and tenant the right of removing fixtures is reserved to the tenant, it seems that such fixtures remain personal property. Hartwell v. Kelly, 117 Mass. 235; Alexander v: Touby, 13 Kan. 64; Adams v. Cioddard, 48 Me. 212; Ewell on Fixtures, chap. 3, 4.
    
      Allen & Wilcox, for appellants, Wheeler & Flint.
    “It is a general principle of law that a building permanently annexed to the freehold becomes a part of it, and is real estate.” District Township v. Mooreheacl, 43 Iowa, 466. One of the leading cases in this country on this question is the case of Teaff v. Hewitt, 1 Ohio 53t. 511. The evidence shows the foundation of the building to be on the ground, and at some places beneath the surface. The controlling evidence of the intent of these parties is in the lease, and, if at time of the-executing of this lease it .was the intention of the parties that the building should become part of the realty, no act of Kelly’s afterwards could sunder or sever it, for the^owners of the land then became vested with ownership of the buildings. The lease provides that Kelly is to keep the. property insured against loss-by fire; why, if the company were not the owners of the building, should they be interested in the question of insurance? At the expiration of the term of the-lease, it is provided that the company may pay the appraised value of the building, and retain the same. In only one contingency has Kelly the right to remove-the buildings and that only in the event that the company require him to do so. If he can not remove-them, are they not fixtures that pertain to, and become a part of, the realty? ICutter v. Smith, 2 Wallace, 491. Kelly’s rights in the building are those simply of a. tenant, and are plainly fixed and determined by his lease. Fletcher had notice of the fact that Kelly could not assign the lease, both actual and constructive, when he took his mortgage; he knew that he was violating the lease, and,that he could acquire no rights thereby. The cross bill set up these facts, and set up the election of the appellants, Wheeler & Flint, to-terminate and declare null the lease. They had the right to ' do this, as they had succeeded to all of the-interest of the railroad company, and had the company’s title to the land. Conceding that the mortgage which Kelly gave conferred upon Fletcher a right to the interest Kelly had, what did he have? Simply a. right, after the property had been appraised, to receive' from the railroad company or from Wheeler & Flint, the two-thirds of the appraised value of the building..
    
      Cliggit & Rule, for appellee, Philip H. Fletcher.
    Kelly'was the owner of an estate in the land. He-had an estate for years in 'the land, and the buildings. were connected with, andpartof, that estate. He had an interest in the land, and the buildings were attached to, and part of, that interest. By his mortgage to plaintiff he conveyed all his interest in the premises, his estate in the land, and the buildings attached thereto. “The words land, real estate and real property, include lands, tenements and interests, hereditaments, and all rights thereto and interests therein, equitable as well as legal.’'’ Code, section 45, subdiv. 8. “Every conveyance of real estate passes all the interest of the grantor therein, unless a contrary intent can be reasonably inferred from the terms used.” Code, section 1930; Frederick v. Callahan, 40 Iowa, 313. Kelly covenanted in the mortgage that he had good right, and lawful authority to sell the property, and warranted the title against all persons. And the mortgage estops him from claiming he was not the owner of the land. The general rule between mortgagor and mortgagee, is that all annexations to the realty pass by the mortgage, unless by express terms the mortgagor except them from the terms of the conveyance. 8 Am. and Eng. Encyclopedia of Law, page 50, and notes. Fixtures pass to a Iona fide purchaser of the real estate, notwithstanding an agreement between the owner of the land and the vendor of the fixtures, that they should remain personal property. 8 Am. and Eng. Encyclopedia of Law, page 56, citing Bringholff v. Mumemnaier, 20 Iowa, 513; Knowltonv. Johnson, FI Mich. 47, and other cases. Fixtures annexed to real estate already mortgaged, pass to the mortgagee. 8 Am. and Eng. Encyclopedia of Law, pages 50, 51, and notes. Most cases hold that chattels already mortgaged, if afterwards attached to realty so as to become fixtures, may be held under the chattel mortgage against a prior mortgage on the land, if they can be removed without serious injury. 8 Am; and Eng. Encyclopedia of Law, page 51 and notes, citing First National Banlt v. Flmore, 52 Iowa, 541. All that Wheeler & Flint could claim would be the surplus over the payment of plaintiff’s mortgage. 'McClain’s Code, section 3317; German Banlt v. Sclotte, 59 Iowa, 316; Curtis v. Broadivell, 66 Iowa, 662; Miller v. Seal, 71 Iowa, 392.
   Kinne, J.

The defendants Mary M. Kelly and Mary M. K. Judd are the same person. The pleadings and stipulations of the parties cover about one hundred printed pages. We shall endeavor to state the facts touching the matters in controversy between the parties, in so far as they are material to the questions raised by these appeals:

Prior to November 1, 1882, the defendant S. R. Kelly had been negotiating with the officers of the defendant, the Chicago, Milwaukee & St. Paul Railway Company for the purchase, of them, of a tract of ground-lying at the side of, and ádjacent to, the right of way of said company at Sanborn, Iowa. Pending these negotiations, Kelly had entered into possession of the premises, and begun the erection thereon of. a large brick-veneered hotel building. When he went into possession and began to improve the property, it was with the understanding had with officials of the railway company that the company would make him a deed to the land. After he had his material on the ground, and the building partly erected, he learned that the company would not give him a deed, but would lease it to him for a term of twenty years. He then entered into a contract with the railway company, leasing the ground for twenty years.

The lease provided, among other things, that Kelly should pay one dollar per, year as rent for the ground; that he should keep and operate a hotel and railway eating house upon the premises. Under certain circumstances the lease might be forfeited, in which case, as well as at the expiration of the term, the lessor was to take the buildings at an appraised value; or, if the term expired, and the lease was not renewed, and the -company should not wish to take the buildings, then .Kelly might remove the buildings within sixty days ..after receiving notice to do so. The lease was dated .November 1, 1882, but was not recorded until May 16, 1883.

May 9, 1883, Kelly borrowed of the plaintiff two thousand, five hundred dollars, giving his note therefor, due May 9, 1888, and drawing eight per cent, interest, and secured by a mortgage in the form of real estate mortgage on the land on which the buildings were situated. This mortgage was filed for record, and recorded as a real estate mortgage, on May 16, 1883. The mortgage recited that the premises were free from incumbrance. June 1, 1888, the plaintiff began his action to foreclose this mortgage, making all the parties heretofore mentioned parties defendant, and claiming a first lien on said property. September 19, 1888, the railway company filed an answer setting up their ’.lease with Kelly, and claiming that he had no right to mortgage the property. The plaintiff demurred to this answer, but. the demurrer was withdrawn, and no further steps taken in the case, so far as the railway company was concerned.

December 14, 1888, the defendants Wheeler & Flint answered, denying generally, and claiming that on January 7, 1888, they contracted with Kelly to furnish him materials for an addition to said hotel building; that they furnished same, to the value of five hundred and twenty-nine dollars and ninety-nine cents, prior to May 26, 1888, according to contract, which were used in said building; that they filed a statement for a lien; and that an action was pending to enforce their lien, and asking that their lien be decreed prior to plaintiff’s mortgage.

September 11,1889, the defendants MaryK. Judd, Mary M. Kelly, and Mary M. Kelly, executrix (who-will hereafter be referred to as Judd), filed her answer, alleging that on March 21, 1883, she loaned to S. R. Kelly six thousand, nine hundred dollars, for which he-executed his note due April 1, 1888, with interest at eight per cent., and on the same day secured the same-by a chattel mortgage on the hotel building before-mentioned. This mortgage was filed for record July 20, 1883, and recorded as a chattel mortgage. She-avers that the plaintiff, at the time he took his mortgage, had actual and constructive notice of her mortgage. She claims priority, as to the buildings, over the lien of the plaintiff’s mortgage.

September 11, 1889, judgment was rendered against the defendant, S. R. Kelly, on default, in favor of the plaintiff, on his claim, and a decree of' foreclosure entered against him. The plaintiff replied to the pleading of Judd, denying knowledge or notice-of her mortgage at the time he made his loan. May 10, 1890, Wheeler & Flint filed a cross petition setting-out that they had secured a judgment on their lien' claim, had sold the property, and bid in the same at the sale, and claimed the premises as.against all the parties to this suit. Fletcher was not a party to- the lien foreclosure. May 27, 1890, the plaintiff filed a demurrer to-the said cross petition of Wheeler & Flint, which was sustained. June 3, 1890, Judd filed an amendment toller answer, claiming that the property was personal,, and that the plaintiff’s mortgage was no lien thereon,, and that she had no notice of the plaintiff’s mortgage. A decree was entered in the case on June 19, 1891, wherein the plaintiff’s mortgage was decreed to be a. first lien upon the property, including all the buildings, the defendant Judd’s chattel mortgage a second lien on the buildings only, and Wheeler & Flint’s mechanic’s lien a third lien on the premises. -

I. It is claimed that, at the time the plaintiff loaned his money and took his mortgage, he had actual notice of the Judd mortgage. There is some testimony, which is not of a satisfactory character, which tends to support the contention. But the great weight of the ■evidence, in our judgment, clearly shows that he made the loan, and took his security, in absolute ignorance ■of the Judd loan and mortgage. In view of the testimony of Cliggett,Lee, and Rule as to the admissions of '¡3. R. Kelly, it seems certain that Kelly, in order to effect the loan of the plaintiff, concealed from him the fact that a prior loan had been made, which was secured by a mortgage on the buildings. The circumstances ■surrounding the transaction all indicate that the plaintiff would never have made the loan had he known of the Judd mortgage. Prior to making the loan the plaintiff took steps to ascertain if there were any liens upon the property, "and the proper records of the county disclosed none. We conclude that it satisfactorily appears that the plaintiff had no knowledge of the Judd mortgage until about a year after his loan was made, and security taken.

II. It is urged that when the plaintiff took his mortgage he was bound to take notice of the terms and conditions of the lease from the railway ^ company to Kelly. Counsel for Mrs. Judd seem to have overlooked the fact that the plaintiff’s mortgage was taken and filed for record before the lease was filed for record, .and there is nothing to show that, prior to the recording of the lease, the plaintiff had any knowledge of its •existence. We .do not deem this a matter that need be •discussed, as, in our view of the case, the provisions of the lease show that it was the intention that the buildings should be treated as a part of the real estate.

What constitutes a fixture, in a given case, is a question upon which the authorities are not agreed, and we shall not undertake the unprofitable task of attempting to reconcile or classify them. The trend of modern-decisions is that, subject to the manner of annexation, to the realty, and to the use and purposes of the realty, with which a thing in controversy is connected, its-character as a fixture or not, is tobe determined by the intention of the party making the annexation. Ewell on Fixtures, 21; Tyler on Fixtures, 114; 1 Jones on Mortgages, section 429; Cobbey on Chattel Mortgages, sections 204, 205; Teaff v. Hewitt, 1 Ohio St. 530; Potter v. Cromwell, 40 N. Y. 296; McRea v. Bank, 66 N. Y. 489; Binkley v. Forkner, 117 Ind. 176, 19 N. E. Rep. 753; Ottumwa Woolen Mill Co. v. Hawley, 44 Iowa, 57. It is said in the case last above cited that the-intention is the controlling consideration in determining the whole question. This court has held that, “fixtures are personal chattels annexed to the freehold,, and which may be severed and removed by the party who has annexed them, against the will of the owner of the freehold.” Pickerell v. Carson, 8 Iowa, 551.

Now, it is clear that, by virtue of his lease, S. R. Kelly owned an estate in land, and on this land the buildings in controversy were situated. We have held that a homestead may exist in a leasehold interest in real estate. Pelan v. De Beyard, 13 Iowa, 53. And a. sale of a leasehold under execution, having more than-two years of an unexpired term, may be redeemed, from. Code, section 3098. . And under our law any conveyance of real estate passes all the interest of the-grantor therein, unless a contrary intent can be reasonably inferred from the terms used. Code, section 1930; Frederick v. Callahan, 40 Iowa, 311. That such a. leasehold estate as that at bar constitutes an interest in lands is clear; and it follows that a conveyance of it-by mortgage carries with it the buildings or improvements thereon, unless a contrary intent appears.

In view of the principles of’ law above stated, was-this property, including the buildings and improvements thereon, real estate, as between S. R. Kelly and the plaintiff, so as to make the plaintiff’s mortgage a first lien thereon? Let us examine the character of the annexation of this building to the realty on which it stood. The original building was a brick-veneered structure, three stories and an attic in height, with slate gables and iron shingle roof, and cost' seventeen thousand dollars. An attempt was made to excavate, and put the foundation in the ground, but the ground was so wet that it had to be abandoned, and the foundation was laid on the top of the ground, on large footing stone. In 1888 an addition was built to the hotel, of frame sheeted for brick veneering. It was part two, and part three, stories in height. There was a water pipe running from the company’s waterworks to and under the building. Sewer pipes also ran under the building. There were three platforms' on the south side of the building, one sixty-five by forty, one twenty-five by sixteen, and one eight- feet square. There was an excavation under the building eight feet wide and forty feet long. There was a large cistern at the north end of the building. The land on which this building is erected adjoins the track and depot grounds of the Chicago, Milwaukee & St. Paul Railway Company at Sanborn, which it appears is a town situated at the end of a division on said line of road. The building was to be erected upon the company’s grounds, to be used as an hotel and railroad eating house for the accommodation of the patrons of the railroad company. Trains stopped there for meals.

Now, what was the intent of Kelly as to making these improvements fixtures? It appears that, without conflict, at the outset, he expected to obtain a deed from the railway company for the land, and, while having this understanding with the superintendent of the company, Kelly got his material upon the ground, and had-the building in the course of erection, when he learned that they would not give him a deed for the land, but would give him a twenty year lease. It is certain, then, that the original intention of Kelly was to make these improvements a part of the realty. Was that intention changed afterwards? It does not appear that his plan as to the building was in any respect changed by reason of his failure to obtain a deed. On the contrary, he proceeded with the erection of the building as originally planned, as he had before he knew he could not obtain a deed.

But the lease itself clearly shows Kelly’s intention. By its terms he was required to maintain upon the demised premises a good, substantial building, with all the customary outhouses, and other improvements and appurtenances, to be used and occupied as an hotel and eating house; and said buildings were to be so located as to be convenient for the purposes for which they were designed.^ They were to be kept in a clean and healthy condition. He bound himself, during the term of said lease, to carry on and conduct an eating house and hotel to the satisfaction of certain officers of the railway company. He was to keep the buildings and contents insured, and, if the hotel was damaged by fire, was to rebuild- it. He was required to keep the buildings in good repair, and to pay all taxes on the property. If the lease was determined by lapse of time, and the company should refuse to renew it, they were to pay the appraised value for the improvements. If it was determined by forfeiture, they were to pay two-thirds of the appraised value. If, at the end of the term, Kelly refused to renew the lease, the company had the option of taking all the improvements at the appraised value, or of requiring Kelly to move them oft within sixty days after notice. Under the terms of this lease, Kelly could not, in any event, remove any of the buildings, unless permitted to do so by the company. Under the definition given by this court in Pickerell v. Carson, 8 Iowa, 551, these buildings and improvements were not fixtures, because they could never be removed, except at the will of the lessor. The obligation to erect and maintain these buildings was one, if not the main, consideration on the part of the railway company for the lease. The company were, by the provisions of the lease, providing for an eating house and hotel, which at that point was a necessary .and valuable adjunct to their business as carriers of passengers. Had it been intended that the buildings should be considered as chattels, merely, it is reasonable to suppose that Kelly would have incorporated in the lease apt language, which would have given him the right to remove them of his own accord. Under the circumstances disclosed in the evidence, the building, as tnthe character of its annexation to the land, is ns permanent as if Kelly had the fee title to the land on which it stood. All the acts of the parties to the lease tend strongly to show that the improvements were intended to become a part of the realty. The character of their use in connection with the land, and their relation to the business of the railway company, all support our conclusion. Every step taken by Kelly in connection with the execution of the plaintiff’s mortgage indicates that at that time he considered and treated the buildings as a part of the realty. His testimony touching the negotiations with the plaintiff for the loan shows that the improvements were considered as the valuable part of his leasehold interest. This mortgage, then, must be held to cover Kelly’s entire interest in the real estate, including all the improvements thereon. It follows that, the plaintiff having taken his mortgage for value, and without notice of Mrs. Judd’s mortgage, it is a prior lien on the property.

III. The defendants Wheeler & Flint filed a cross hill setting up certain matters by reason of which they claimed a lien on the bxd-lding superior to plaintiff’s mortgage. A demurrer of the plaintiff to this cross bill was sustained,, and the record does not .show that Wheeler & Flint-stood upon this ruling, and hence we can not consider questions arising thereon. In another part of their answer they claim that their mechanic’s lien is superior to the plaintiff’s mortgage. The material for which the lien was claimed was furnished for an addition to-the hotel in 1888, about five years after the plaintiff’s; mortgage was executed and recorded, and six years after the oiiginal building was erected. Under our holding, this addition became a part of the real estate, and of the original building, and Wheeler & Flint are only entitled to a lien, as against the plaintiff, for any balance that may remain after a sale of the property on the plaintiff’s claim, and the satisfaction of their debt, with interest and costs. German Bank v. Schloth, 59 Iowa, 316; Curtis v. Broadwell, 66 Iowa, 662; Miller v. Seal, 71 Iowa, 392.

IY. The defendants Wheeler & Flint and Judd complain of the action of the coux-t in taxing an attorney’s fee in favor of the plaintiff’s attorneys. They insist that the affidavit required by law to be filed as the basis for the allowance of the fee was not filed until over a year after the filing of the petition in the actioxi, and hence no fee could be taxed. The record shows-that an affidavit was filed by the plaintiff’s then attorney, Mr. Lee, when he filed the petition. Afterwards, Mr. Lee removed from the state, and the present counsel were employed. They filed another affidavit. Both affidavits were in the form prescribed by the statute. By chapter 185, section 3, of Acts of the' Eighteenth General Assembly, it is provided: “Before any allowance of attorney’s fee shall be made by the court, the-court shall be fully satisfied, by affidavit of the attorney engaged in the cause, which affidavit shall be filed with, the original papers, that there has. been, and is, no-agreement, express or implied, between the attorney and any other '- person, except a practicing attorney engaged with him as attorney in the cause, for any division or sharing of the fee to be taxed; and no fee-shall be taxed except in favor of a regular attorney, and in compensation for services actually rendered in the-cause.” The filing of this affidavit was a condition precedent to the allowance of an attorney’s fee. A propeiaffidavit having been filed with the petition, and the-attorney who commenced the action having severed his connection with the cause, it was necessary that the-attorneys who afterwards prosecuted the cause to its conclusion should, file an affidavit. This last affidavit-may be treated as an amendment to the former one, rendered necessary by the withdrawal of the original, attorney in the cause. Such being the case, the fee was-properly allowed.

Y. Wheeler & Flint complain of the decree entered in this case in many particulars, which, if erroneous, can only affect the railway company,. which has not appealed. These alleged errors are not available to Wheeler & Flint.

YI. We are required to determine the question of' priority of liens, as between the Judd mortgage and the Wheeler & Flint mechanic’s lien. Wheeler & Flint had no actual notice of the Judd mortgage. Our statute provides that “no instrument affecting real estate is of any validity, against, subsequent purchasers for a valuable consideration, without notice, unless recorded. in the office of the-recorder of the county in which the land lies, as hereinafter provided.” Code, section 1941. Now, if we treat, the Judd mortgage as an instrument affecting real estate, was it of any validity as against the mechanic’s-lien*, it not having been indexed or recorded in the proper books pertaining to real estate mortgages?

It will be observed that the statute only protects subsequent purchasers for value, and without notice. We have said that the term “subsequent purchaser” means one who claims under some common grantor, under the same chain of title. Rankin v. Miller, 43 Iowa, 11. And we have held that a judgment creditor is not a subsequent purchaser, within the meaning of this section. Norton v. Williams, 9 Iowa, 528; Bell v. Evans, 10 Iowa, 353; Seevers v. Delashmutt, 11 Iowa, 174; Hays v. Thode, 18 Iowa, 51; Chapman v. Coats, 26 Iowa, 288. We think that a mechanic’s lien holder does not come within the protection afforded by the statute. He is not a purchaser, not more so than a judgment creditor, and hence must, at his peril, take notice of all liens and incumbrances, whether recorded or not. His lien attaches to the real estate, subject to all outstanding equities, whether he had notice of them or not, except in so far as this rule may be modified by the mechanic’s lien statutes. See Miller v. Stoddard, 52 N. W. Rep. (Minn.) 895. Kelly and Judd then having, as between themselves, elected to treat these buildings as chattéls, and mortgaged them as such, Wheeler & Flint were bound to ascertain, at their peril, the facts touching the Judd mortgage, and act accordingly. It does not appear that, when they purchased the property under their lien judgment, they had no knowledge of the Judd mortgage. If it did, the rule might be different. Weaver v. Carpenter, 42 Iowa, 343.

The decree of the court below is affirmed.  