The mortgage to a trustee, to secure the payment of bonds to be thereafter issued, was valid, and became effective as the bonds were disposed of. Richards v. Railroad, 44 N.H. 127, 137; Stavers v. Philbrick,68 N.H. 379. At the times the attachments were made the mortgage was a lien upon the property to the extent of the money then advanced upon the bonds, or $14,100 as against the Davis Farnum Company and $19,100 as against Kendall. As to sums thereafter advanced, the attachments take precedence. It is only upon the theory that the mortgage takes effect as of the time when the debt is created or obligation assumed, that the objection that it is made to secure future advances is avoided. Stavers v. Philbrick, supra. Whatever theoretical objections there may be to the proposition that a mortgage to secure several obligations may take effect at one time as to one engagement and at a later date as to another, the fact that such mortgages as this have always been treated as valid is a sufficient reason for upholding them. "Common errors, upon which great amounts of property have been invested, cannot safely be corrected." Richards v. Railroad, supra.
The discharge of the prior mortgage and the taking of the later one in its stead did not affect the rights of the parties. A discharge of a mortgage is always treated as an assignment when justice requires such a course for the protection of equitable rights. Holt v. Baker, 58 N.H. 276, and cases cited. The attaching creditors have not done or omitted to do any act relying upon the recorded discharge (Holt v. Baker, supra), and cannot complain because the transaction is given the effect intended by the parties thereto. By their attachments these creditors became subsequent incumbrancers, against whom the rule of equitable assignment has frequently been applied. Hammond v. Barker, 61 N.H. 53, and cases cited.
The defence that the mortgage to secure the last issue of bonds was ultra rites, because the amount of the issue was more than one half the cost of the Light Company's property, is also set up. The company could not avail itself of this defence, for it has received and now retains the proceeds of the contract. M. L. Railroad v. Railroad, 66 N.H. 100, 127. These creditors *Page 120 cannot invoke the aid of this doctrine, for it is applied only at the instance of the state, the corporation, or its stockholders, or of a third person whose rights are infringed by the illegal agreement. Gr. Brice, pt. IV, c. 2. Assuming that the execution of this mortgage was beyond the powers granted to the company, and that these creditors so far stand in the position of innocent purchasers as to have the right to attack it (Commonwealth v. Smith, 10 Allen 448, 459), the defence is not available here. The claim that a contract is void because beyond the charter powers of a corporation is seldom recognized as a defence to an agreement otherwise unobjectionable, and never except as a shield against wrong. Whitney Arms Co. v. Barlow, 63 N.Y. 62, 69; Lewis v. Association,98 Wis. 203. The bonds for which this mortgage is security, as against these creditors, amount to less than $20,000, a sum which is assumed to be within the limit mentioned in the charter, or one half of the cost of the company's property. If no further issue of bonds had been made, no one could have complained; and as the subsequent issue had no effect adverse to these creditors, it requires no argument to show that they ought not, in equity, to be allowed to base an enlargement of their rights upon such acts. A mortgage given to secure both a present debt and future advances is valid as to the former. Stavers v. Philbrick,68 N.H. 379, and cases cited. No good reason appears why the same rule should not apply to any mortgage which is in part in excess of the power of the mortgagor to give. In the absence of fraud, this principle applies to contracts of corporations which are in part ultra vires. Thomp. Corp. s. 5981.
The plaintiffs are entitled to an equitable lien upon the property to the extent of $14,100 as against the Davis Farnum Company, and $19,100 as against Kendall. Such order will be made at the trial term as will protect their equitable as well as the defendants' legal rights in the premises.
Case discharged.
PARSONS, J., did not sit: the others concurred. *Page 121