This was a proceeding for the distribution of surplus nioneys arising from the sale of real property upon the foreclosure of a mortgage. The substantial question in dispute seems to be as to whether the appellant, as trustee in bankruptcy of one William W. Vaughan, or George D. Brown, the respondent, was entitled tó such surplus moneys. The appellant, as trustee, made an application for the surplus moneys, which resulted in an order of reference to ascertain and report the amount due to said trustee or any other person which is a lien upon the fund, and to ascertain the priorities of the several liens thereon. On the first proceeding before the referee the appellant in person with a clerk from the appellant’s attorney’s office attended before the referee, the appellant’s counsel being at that time engaged in the trial of a case- in court: Upon, the hearing, with the assent of the appellant, a stipulation was entered upon the stenographer’s minutes, which is as follows: “ It is agreed that the referee employ a stenographer, his fees to be a part of the referee’s fees, and to be paid out of the fund.” No question as to this stipulation was raised until after the evidence before the referee was all in, when, upon an examination of the minutes for the. purpose of' preparing his brief; the counsel for the trustee received the first intimation of the fact that such stipulation had been made, whereupon a motion was promptly made to relieve the parties from the stipulation so far as it provided that the expenses of the reference should ■ be paid out of the fund in court.
It seems to have been assumed upon the argument that this stipulation required not only the stenographer’s fees but also the referee’s fees to be paid out of the fund; but that construction of the stipulation is open to question. The stipulation appears to refer solely *333to the appointment of a stenographer and to his fees, and would-seem to imply that it was the stenographer’s fees that were to be paid out of the fund, and not the referee’s.- We do not think that the parties to a proceeding of this character should be allowed to stipulate as to the distribution of a -fund in court so as to bind the court as to the distribution of the fund. Any understanding between the parties as to the way a fund in.eourt is to be distributed must be subject to the control of the court, and such a stipulation cannot control the disposition that the court will make of the fund in its hands. The costs in such a proceeding are ten dollars costs of motion and the disbursements, which would include the referee’s fees and the charges,of a stenographer; but such motion costs are by the express provisions of the Code in the discretion of the court to be imposed in such a way as justice requires ; and, where such costs are discretionary, no stipulation of counsel as to whether or not they shall be imposed, and, if imposed, whether they should be paid out of a particular fund or by a party to the controversy, can control the exercise of this discretion.
In this connection it is also proper to consider the relation in which the appellant stood to this fund. He was a trustee for the benefit of creditors, and, occupying such a position, it is the duty of-the court to protect the interests of those for whom he is trustee and not to permit improvident stipulations to deplete the fund. A stipulation that all the referee’s and stenographer’s fees should be paid under any circumstances out of the fund appeal’s to us to be quite improvident, as its tendency would be to .unduly extend the reference and increase the amount of such disbursements. If the party, whose opposition to the payment of the fund to the person entitled to it, understands that there- can be no costs imposed upon him for a prolonged continuance of the proceeding, one of the principal incentives to make these expenses as light as possible is taken away and the proceeding is apt to drag along, largely increasing the expense of both the referee’s and the stenographer’s fees. We wish to express our disapproval of such stipulations and to declare that the parties to such a proceeding are not authorized to enter into any. ■ stipulation which takes away from the court the power vested in it by the Code of determining as to the amount of such costs and disbursements and by whom they shall be paid, and that no stipulation *334can. bind the court, as to the: disposition of money in its possession, entered into without the approval of the court. We think under these circumstances that the court below should have granted the application so far as to relieve the parties from so much of the stipulation as provides that any part of these disbursements of the reference should be paid out of the fund.
The. order appealed from is, therefore, reversed and the motion granted to the extent indicated. As, however^ the appellant seems to have been as much at fault in making the stipulation as the respondent, the order should he without costs to either party.
Van Brunt, P. J., Patterson, O’Brien and Hatch, JJ., concurred.
Order reversed and motion granted to the extent indicated in opinion, without costs.