HOOK, Circuit Judge.
A. C. Houston, a citizen of Kansas, sued Richard D. Harlan, a citizen of Illinois and executor of the will of Phineas Prouty, deceased, for an accounting by the latter as a mortgagee in possession of a tract of land in Lyon county, Kan., and for the enforcement of a right of redemption. Plaintiff began the suit in a state court in Kansas, and defendant removed it to the court below upon the ground of diversity of citizenship. Defendant asserted title to the land through a suit in-the state court to foreclose the mortgage commenced in 1894, completed in 1895, and resulting in a judgment, foreclosure sale, and a shériff’s deed in which he, the defendant, was grantee. With an exception that need not be detailed, the defendant has been in possession of the land under the sheriff’s deed ever since 1896.’ J. G. Hutchison, who claimed an interest in the land, intervened and objected to the jurisdiction of the trial court. . The trial court denied the objection of the intervener, held that the foreclosure sale and sheriff’s deed to defendant were invalid, and awarded plaintiff the right of redemption with an accounting. The defendant appealed. The questions involved are of the court’s jurisdiction, the plaintiff’s right of redemption, and the terms of the accounting.
[1] The objection to the jurisdiction: The original payee from ■whom defendant’s testator acquired the note and mortgage was a citizen of Kansas the same as plaintiff. The intervener therefore asserts that since the federal court could not have had original jurisdiction of a suit upon the note and mortgage had the original payee not assigned them, the suit at bar was not removable from the state court by defendant. Sections 24 and 28, Judicial Code (Act March 3, 1911, c. 231, 36 Stat. 1091-1094 [Comp. St. §'§ 991, 1010]). The question finally is whether this is a suit upon the note and mortgage within the meaning of section 24. The answer must be found in the nature of the suit, and the relief sought by the plaintiff. The plaintiff is not here seeking to enforce the stipulations of the note and mortgage, but, on the contrary, is assailing their continued effectiveness. His main object is the clearance of his title to the land by annulling the foreclosure sale and sheriff’s deed to defendant and accomplishing his right of redemption from defendant’s mortgage lien. The suit is more like the common one to quiet title upon the doing of equity than one for the enforcement of a right of action founded on a contract containing *613within itself the contractual promise or obligation that is broken. A suit to redeem from a mortgage in the nature of a suit to quiet title has been held not within- the statute. Power & Irrigation Co. v. Ditch Co., 141 C. C. A. 390, 226 Fed. 634. There is also an analogy to a suit to recover possession of a specific thing mortgaged, likewise held not within the limitation. See, generally, Corbin v. County of Black Hawk, 105 U. S. 659, 26 L. Ed. 1136; Deshler v. Dodge, 16 How. 622, 14 L. Ed. 1084; Bushnell v. Kennedy, 9 Wall. 387, 19 L. Ed. 736.
[2] The slight change in the statutory language from a suit “to recover the contents of any promissory note,” etc., as it was formerly, to a suit “upon any promissory note,” etc., as it is now in the Judicial Code, has not changed the law. Brown v. Fletcher, 235 U. S. 589, 35 Sup. Ct. 154, 59 L. Ed. 374. The old construction is still applicable. The intervener’s objection was therefore rightly denied.
[3] The invalidity of the foreclosure sale and sheriff’s deed to defendant because the order of sale was not authenticated by the seal of the court, and that defendant became a mortgagee in possession instead of owner, were settled for this controversy bv Stouffer v. Harlan, 68 Kan. 135, 74 Pac. 610, 64 L. R. A. 320, 104 Am. Rep. 396. Stouffer was plaintiff’s predecessor in title and his action was in ejectment. The court said: “The omission of the seal rendered the order of sale and all proceedings under it null and void.” We must take the case at bar in that way, although if the question were open we would follow on principle as well as authority the later decision of the same court that the omission of the seal of a court is an irregularity cured as against collateral attack by confirmation of the sale. Carter v. Hyatt, 76 Kan. 304, 91 Pac. 61. Harlan defeated Stouffer’s action in ejectment upon the expressed ground of a mortgagee in possession, and we cannot escape that conclusion as the law of the case. In the later case of Stouffer v. Harlan, 84 Kan. 307, 114 Pac. 385, defendant was still regarded as a mortgagee in possession.
[4] The record does not clearly disclose all the details of the accounting, but we think it went in accord with the following rules: In Kansas a mortgagee in or out of possession may pay taxes, if the owner does not, and have interest at 12 per cent. The rental value of the property is chargeable to a mortgagee in possession as payments upon the mortgage debt and his tax claims. As a general rule, the debtor has the right to direct the application of his payments; if he does not do so, the creditor may; if neither does so before a controversy has arisen, the court will apply them according to its notions of justice, exercising a sound discretion. Holly v. Missionary Society, 180 U. S. 284, 292, 21 Sup. Ct. 395, 45 L. Ed. 531; National Bank of the Commonwealth v. Mechanics National, 94 U. S. 437, 439, 24 L. Ed. 176. It is to the public interest that taxes upon which the government relies for its maintenance be promptly paid, and the inducement of the rate of interest to a mortgagee is in accord with that principle. An application by a court of payments first to tax claims and then to mortgage debt cannot be said to be contrary to a sound discretion. The making of periodical rests in which balances of accrued interest after partial payments are added to the principal for future *614computation is not favored in the courts of the United States. “The correct rule, in general, is, that the creditor shall calculate interest, whenever a payment is made. To this interest, the payment is first to be applied; and if it exceed the interest due, the balance is to be applied to diminish the principal. If the payment fall short of the interest, the balance of interest is not to be added to the principal so as to produce interest.” Story v. Livingston, 13 Pet. 359, 370 (10 L. Ed. 200). See, also, United States v. McLemore, 4 How. 286, 288, 11 L. Ed. 977.
There are some other matters, including defenses of laches and limitation, but we do not think the court erred in regard to them.
The decree is affirmed.