Cooper, J.,delivered the opinion of the court.
On April 13, 187.8, James L. Gaines, being then Comptroller of the State of Tennessee, undertook officially to appoint J. PI. Galbraith “special commissioner to collect any State tax on suits or other State revenue, which, on investigation of the offices of the clerks of the several courts of Davidson county, may be found to be due and mmollected.” On July 6, 1878, Galbraith, with the other plaintiffs in error as his sureties, executed a bond to Gaines as Comptroller in the penal sum of f5,000, to be void “ on condition that the said special commissioner and agent, heretofore appointed and commissioned as such by the said James L. Gaines, shall well and truly perform all the duties incumbent upon him as such special commissioner and agent, and pay over all monies which shall come into his hands by virtue of his said commission and agency, after deducting all just commissions and all necessary expenses bona fide incurred in collecting the same, otherwise to remain in full force and effect.-”
This suit was brought by the State and James L. Gaines, as Comptroller, for the use of the State, against the obligors to the bond, the declaration being upon the bond and assigning various breaches, the main breach being that Galbraith, as special commissioner and agent, had not paid over all the monies which came to his hands by virtue of his commission and agency.
*570The suit was of a simple character, but the ingenious and able young counsel of the respective parties,, who tried their “prentice hand” on the pleadings, have succeeded in complicating it astonishingly. The-first step in this direction was in bringing the suit in the name of the State and of James L. Gaines for the use of the State. This move presented an opening for a demurrer, which was promptly seized upon, with so many assignments that the trial judge deemed it the easiest plan to overrule them all. The defendants thereupon put in the apparently proper and innocent pleas of nil debit, covenants performed, and set off. Then the plaintiffs took a turn at demurring,, forcing their adversaries to increase the number of their pleas, without g lining any material advantage. The next step was taken by filing replications, several of them to one or two pleas. Whereupon the defendants demurred to the replications. The demurrer being, overruled, the defendants took issue. And the learned counsel of the plaintiffs below now insists, in this court, that two of his replications set up new matter, and should have been met by a rebutter instead of a similiter. But as that might require a surrebutter, we are inclined to let well enough alone and stop where we are.
Issue having been joined, after the masterly maneuvering, to the satisfaction of the circuit judge, his Honor knocked things into • pi by referring the case, over the objection of the defendants, to the clerk to take and state an account between the parties. By this order the clerk was directed to charge the de-*571fenc!ants with all money collected by Galbraith as special commissioner, and credit them with payments made into the State treasury, with reasonable commissions on the money so paid, and with the expenses properly incurred in making the collections. The clerk seems to have prepared a report in July after the order, which was made in April, but opened it in September at the instance of the 'plaintiffs, filing it on. October 8. The court met on the 10th of October, and took up the case in advance as a case in which the State was interested. The defendants made an application for a continuance to take their proof, upon the ground that the State had only closed its testimony on October 8. The trial judge refused the application, and required them to go to trial in the afternoon of that day. The jury were sworn to try the issues joined, and the plaintiffs introduced their proof. When the defendants offered their testimony, the plaintiffs objected upon the ground that it ought to have been taken on the reference. The judge sustained the objection, and afterwards withdrew the case altogether from the jury. He gave judgment in favor of the plaintiffs for the full amount claimed, without any allowance for commissions on collections or expenses of collecting. The defendants, naturally enough,, appealed in error.
If his Honor, the trial judge, had adhered to the principles settled by his order of reference, and, after allowing the defendants reasonable time, to take their proof, had heard the case upon the report and exceptions thereto, the defendants could have had no sub*572stantial cause of complaint. Or if bis Honor, after the jury were empaneled, had permitted all the evidence, including the clerk’s report of the items of debit, to go before them, and allowed them, upon a proper charge, to render a verdict upon the issues joined, there could have been no substantial cause of complaint. In either event, the whole facts would have been developed, and the ends of justice attained. As it is, the defendants have not had a hearing, and may .justly complain.
The suit was brought upon the bond executed by the defendants to Gaines as Comptroller. The declaration did not aver, nor does the proof show that the bond was ever assigned by him to the State. Under these circumstances, the State was not a proper party ■ as an independent plaintiff, and the demurrer to the •declaration on this ground should have been sustained. The suit was properly brought in the name of Gaines for the use of the State. Gaines was, of course, bound by the terms of his own contract as embodied in the bond. And if the State bad brought the suit in its •own name upon a proper assignment of the bond, its rights would have been precisely the same. There was no law authorizing Gaines, as Comptroller, to appoint a special commissioner or agent of the State, or even a private agent of his own, for the purposes mentioned in the letter of appointment and secured by the bond. The rights of the parties were necessarily ■governed by the express terms of the contract. That •contract was that Galbraith was to' pay over, as the ■ agent of Gaines, all monies which came to his hands *573by virtue of his agency, after deducting just commissions and n’ecessary expenses. The language does not admit of doubt.- And a repudiation of a part of the contract would be an abandonment of it altogether.. The stipulations are as binding upon the obligee as upon the obligors. The defendants were, therefore, clearly entitled to a deduction from the charges for-commissions, expenses and payments.
The only question of any difficulty is whether Galbraith is chargeable with the amounts collected by him as State tax from the successful party to the suit. At the time the authority was given and the collections were made, the tax on litigation was understood by clerks and litigants, and perhaps by the members of' the legal profession, as costs in the cause, which might be collected from the successful party if it could not be made out of the unsuccessful party. It was after-wards held by this court that the State was not entitled to recover as costs from (he successful party, the tax imposed upon the unsuccessful party by statute State v. Nance, 1 Lea, 614. In the meantime, Galbraith, as the agent of Gaines, had made collections of the tax from the succesful litigants. His counsel now insist that he is not liable for the money thus collected to his principal.
It is the settled law of this State that money voluntarily paid upon an unlawful assessment of taxes, the payment of which might have been successfully resisted, cannot be recovered back from the officer who has wrongfully collected it: Dickins v. Jones, 6 Yer., 483; Caunin v. Mayor, 3 Baxt., 453. So also it *574has been held that if the tax collector actually collect taxes imposed by a statute afterwards decided to be unconstitutional, or penalties under a statute which has been repealed, he and his sureties on his official bond will be liable to the Slate therefor: Chandler v. State, 1 Lea, 296. By statute, if any officer required to give bond for the performance of an act or the discharge of duty, receives money or property upon the faith of such bond, he and his sureties are estopped to deny the legality of the proceedings under which the money or property was obtained, or the validity of the bond: Code, sec. 774. These provisions are extended to executors, administrators, guardians, special commissioners, receivers, and others required by law, or in the course of judicial proceedings, to execute bonds for the performance of particular acts or the discharge of duty: Code, sec. 776. The provision of these statutes and decisions were applied in the case of a person acting as tax collector under an appointment by unconstitutional officials, who had collected taxes under a void levy: McLean v. State, 8 Heis., 22, 254. “And,” the court adds, “we are of opinion that the sections (of the Code), do nothing more than state a sound common law principle”: Id. 255. That principle is that where an officer has actually received public revenue, either under an invalid authority or without any color of authority, he and his sureties are estopped to resist a recovery of the money thus received. For the same reason, a guardian cannot contest the title of his wards •to the estate which he may have received for them: McAlister v. Olmstead, 1 Hum., 210. And a guardian *575or trustee will be held liable for usurious interest collected on the trust funds. There is no reason why the estoppel should not operate in this case. The money was collected by virtue of the agency and as agent, and unless the agent has voluntarily returned it to the person from whom it was wrongfully received, or has been sued for it, or notified not to pay it over, he must account for it. It is his own fault if he renders himself liable to both parties: Metcalf v. Denson, 4 Baxt., 565.
It seems that some few collections were made from persons not parties to the record, but the presumption would be that the payment was made for the benefit of a party, and at his request.
The sureties are, by the express terms of their obligation, only bound for monies which came into the hands of the agent after the date of the bond, and the liability of the principal upon the bond can extend no further. The defendants are entitled to a deduction for commissions on the entire sum collected whether paid into the treasury or not.
The defendants were also entitled to a trial by jury of the issues joined in the pleadings, having demanded a jury at the proper time, and were not required to tender new issues.
Reverse and remand.