This action was brought by one of the heirs of George W. Coóper for a partition and sale of certain premises in which the parties to the action were interested. The action proceeded to final .judgment, under which a sale of the premises was ordered. Upon the application for final judgment the court made an extra allowance, in addition to the taxable costs and disbursements, to the plaintiff’s attorney of $2,000. Subsequently the present attorney became substituted as attorney for the plaintiff herein, and thereupon made a motion to modify the judgment by reducing the extra allowance awarded to the former attorney to the sum of $200. This motion was granted and from the order entered thereon the attorney appeals.
It is not contended but that the extra allowance in excess of the sum of $200 was beyond the power of the court to make. (Code Civ. Pros. § 3253, as amd. by chap. 61, Laws of 1898.) The attorney claims, however, that the modification was -beyond the power óf the -court to make and that it had no power in the premises which it could properly exercise. . This contention cannot be sustained. By express provision of law the' court is authorised at any time within a year to amend or modify a judgment where it fails to conform to the provisions of the Code' of Civil Procedure (§ 124). In the present case the judgment in the respect mentioned *597did not• comply with- the provisions of the Code and consequently the right to amend is brought within the express provision of the section cited.
. If, however, there was no express provision of law authorizing; the amendment or modification, nevertheless, as there is no prohibition of the exercise of the power, the court possessed the inherent: right to make a modification. Courts have always had control over their own judgments, and in the absence of some express prohibition limiting the power may deal with them so that what is right: and just may be done. (Matter of City of Buffalo, 78 N. Y. 362.) So that in either event the court was possessed of ample power to make the modification which was asked, and in the interest of justice its interposition was required. ,
It is further objected, however, that, at the time when the. application was made, the attorney for the plaintiff had no connection with the casethat another attorney had been substituted in his place, and that the plaintiff had also executed to him a general release of all claims and demands. It is clear that the money in excess of the sum which the plaintiff’s attorney was authorized by law to> receive was paid to him for his compensation as an attorney, and unless there was some authority in law, while he would not be,authorized to retain the same to his own use, he would hold it, as. attorney, subject to the direction of the court. It did not become! his property, but belonged to the-parties to the action in proportion to the amount to which each was entitled, which was measured by the extent of each interest in the property partitioned. - Occupying-this relation and being without right to retain the money, the attorney’s custody was the custody of the court, and it possessed authority to make valid direction in respect thereto which was binding upon the attorney. (Matter of H., an Attorney, 87 N. Y. 521 ; Schell v. Mayor, 128 id. 67; Matter of Barkley, 42 App. Div. 597.)
The application was properly made in the action. It was first necessary to procure a modification of the judgment; and this being modified, it became the duty of the attorney to refund the excess of the moneys which he held for the benefit of those entitled thereto. Upon his failure to comply with the modification the proceeding which ordered him to show cause why he should not make restitu*598tion of such moneys was proper, and gave the court jurisdiction to make the order directing restitution.
Of course, as against the plaintiff in the action, the attorney became entitled to have and receive what his services were reasonably worth, and as his compensation was presumably satisfied-by the extra allowance, when that failed he became entitled to resort to his client’s share of the proceeds of the property to discharge whatever obligations' might fairly exist. The court in this order has made provision for the sum which the attorney is entitled to retain as matter of right upon the present proof, and as neither the plaintiff nor any of the other parties, excepting those hereinafter mentioned, have appealed from such order, no objection can be heard in respect thereto.
It was proper to cause to be reserved in the hands of the referee a sum sufficient to discharge whatever the fair compensation, if any, of the attorney may be, over and above what he had received. In this respect- the order granted guards every right of the attorney, and upon no just ground can he be heard to complain of .it, or of any of its provisions. It follows that the orders, so far as the attorney appeals, should be affirmed.
So far as the appeal of George W. and William H. Cooper is concerned, it appears that they were judgment creditors of the plaintiff. The amount of their judgment more than equaled the plaintiff’s distributive share. They were not served with notice, nor did they appear upon either of the motions which resulted in the orders already mentioned. Upon application to the court they asked and were granted leave to intervene and be heard upon the merits .of the last order. This was all the relief which' they asked. After such hearing the court denied their application to modify the order.
Such determination was proper; they ' only became entitled to' plaintiff’s distributive share in the action after the attorney had received his compensation, and as long as he remained attorney he had a lien. When he ceased to be attorney and settled- with the plaintiff he lost his lien '; but as he has been required to make restitution of part of the moneys which he received, it -was not only proper but just to condition in such order the revival of 'the lien and direct the retention of sufficient moneys in the hands of the referee to- satisfy it in case it should be established. ■ This subordinates to *599the lien of the. attorney any right which the judgment creditors possessed in the fund, and this was their relative position so long as the attorney occupied such relation to the action. It follows, therefore, that the conclusion reached by the court was correct, and the orders should be affirmed, with ten dollars costs and disbursements to the respondent in each case.
Patterson, Rumsey, Ingraham and McLaughlin, JJ., concurred.
Order affirmed, with ten dollars costs and disbursements in each ease.