
145 N.W.2d 542 (1966)
In re TRUST created for benefit of Harold L. WARNER, et al., under Will of Ellsworth C. Warner, deceased.
FIRST NATIONAL BANK OF MINNEAPOLIS, trustee, Katherine Warner Erdall, life income beneficiary, and Katherine W. Doerr, one of the remaindermen, Respondents,
v.
Harold L. WARNER, one of the life income beneficiaries, Appellant.
No. 39959.
Supreme Court of Minnesota.
October 14, 1966.
*543 Maslon, Kaplan, Edelman, Joseph & Borman, and Melvin L. Burstein and Stephen B. Swartz, Minneapolis, for appellant.
Cant, Haverstock, Beardsley, Gray & Plant, Faegre & Benson, George McClintock, *544 Jr., and Stephen E. Lee, Minneapolis, for respondents.

OPINION
MURPHY, Justice.
This appeal is from an order of the district court approving the accounts of the respondent trustee and denying distribution of stock dividends on a basis established by a previous order of the court. The issue turns upon the res judicata effect of the previous order, entered by the district court in proceedings under Minn.St. 501.35, which statute authorizes the court to issue instructions in the administration of a trust and settle and allow accounts of the trustee. The order was based upon a stipulation entered into between one of the life tenants and the trustee; it established a basis for apportionment of stock dividends between corpus and income and applied to stock dividends received in 1960 and prior years. It further provided that the same manner of allocation would be followed in future accounts. As will be explained in the discussion to follow, this manner of allocating stock dividends was declared to be contrary to Minn.St. 501.47 by a subsequent decision of this court.
It appears from the record that the trust in question was created under the will of one Ellsworth C. Warner, who died in 1942. His will set up a lifetime trust for the benefit of his son, Harold L. Warner, the appellant, and appellant's wife, then Katherine Warner, now divorced and remarried and known as respondent Katherine Warner Erdall in this proceeding. One-half of the net income from the trust was to be paid to each. The corpus of the trust was to go to the five children of Harold L. and Katherine Warner upon their parents' death. The corpus of the trust has grown from about $606,000 in 1948 to almost $2 million at the present time. Respondent First National Bank of Minneapolis has administered the trust since its inception. The issue presented here arose when the trustee instituted proceedings to obtain approval of its accounts for the years 1960, 1961, 1962, and 1963. Both Harold L. Warner and Katherine Warner Erdall objected to the manner in which stock dividends were allocated as between principal and interest.
It is necessary to make reference to prior proceedings in the administration of this trust. In 1960, the trustee filed a petition in the district court for allowance of the 1958 and 1959 accounts, including the allocation of certain stock dividends between income and principal, and for instructions regarding the allocation of such dividends in subsequent years. In 1951, Minnesota, by statute, adopted the so-called "Massachusetts" rule for allocation of stock dividends. This statute, § 501.47, provides in part:
"Subd. 2. All dividends on shares of a corporation forming a part of the principal, which are payable only in the shares of the corporation, shall be deemed principal."
At the time the 1960 petition was before the court, the applicability of this section to testamentary trusts created before 1951 had not been passed upon. It was the view of the trustee at that time that § 501.47 was inapplicable and that the court should instruct it to allocate stock dividends partly to income and partly to principal in accordance with the so-called "Pennsylvania" rule.[1] The trustee's petition followed a disagreement of long standing between it and appellant as to how stock dividends should be treated in accounting. On August 4, 1961, they executed a stipulation designed to resolve their differences and avoid future controversy by setting up an arbitrary plan for the allocation of stock dividends. They agreed, subject to the approval of the court:
"1. With respect to stock dividends issued by insurance companies and banks *545 and holding companies thereof (there being no impairment of intact value), one-half thereof shall be allocated to corpus and one-half to income.
"2. With respect to stock dividends or split ups of all other corporations, the additional stock received by the trustee shall be allocated to income to the extent that, taken at fair market value, it represents the capitalization of corporate earnings which have been accumulated during the period in which the original shares were held, except to the extent that such allocation shall impair intact value. Any of such shares not so allocated to income shall be allocated to principal. This paragraph rather than the next preceding paragraph 1 shall apply to stock dividends issued by insurance companies, banks and holding companies thereof in cases in which there has been a capitalization of earnings equivalent to the fair market value of the additional stock issued."
The decree entered pursuant to the order contained the provision that "the allocation of stock dividends distributed or distributable after December 1, 1959 * * * shall be in accordance with the stipulation dated August 4, 1961 * * * regardless of any different rule established by legislation or judicial decision." No appeal was taken from this judgment.
The issue with which we are here confronted arose in the 1964 proceedings and grew out of the disputed allocation of certain stock dividends declared on two insurance company stocks. Appellant contended that one-half of each stock dividend should have been allocated to income while the trustee was of the view that such a division would impair the intact value of those stocks. It appears that, at the outset of the proceedings, the dispute centered around the computation of intact value.
It is important at this point to note that the appellant, Harold L. Warner, was the only beneficiary of the trust to join in the underlying stipulation. It appears from the record that there are 2 life beneficiaries, 5 vested remaindermen, and 16 or more contingent remaindermen. It is true that before the trial court made its order the stipulation was submitted to it after notice to all beneficiaries. The record shows that counsel for Katherine Warner Erdall and Katherine W. Doerr, one of the remaindermen, appeared in the 1964 proceedings and informed the court that his clients had not been parties to the stipulation nor to the negotiations leading to it, but that he had appeared on their behalf in the prior proceedings and stated for the record that they "were not consulted in connection with the preparation or negotiation of the stipulation, and that [they] did not and do not approve it, but, nevertheless, had determined that they would not contest it."
Counsel for these respondents then went on to inform the court that in 1963, after the stipulation and order had been entered, the Supreme Court of Minnesota in In re Trust Under Will of Gardner, 266 Minn. 127, 123 N.W.2d 69, had construed § 501.47 and had held that until a corporation's earnings reach the trustee as true income, the beneficiary has no right to such earnings. This court further held that a trust beneficiary has no vested right in a rule of law or formula used to determine what is income for allocation purposes. After determining that the statutory rule adopting the so-called "Massachusetts" rule was retroactive, we went on to say (266 Minn. 136, 123 N.W.2d 75):
"* * * [W]here a district court order now exists instructing the trustee to distribute stock dividends according to the Pennsylvania rule, prompt application should be made to the district court for a change of its instructions in accordance with this opinion."
After lengthy proceedings including oral argument on all issues, including the effect of the Gardner case on future allocation of stock dividends, the district court "on its own motion" vacated that portion of the 1961 order which incorporated the stipulation.
*546 This brings us to appellant's claim that the court was in error in vacating the portion of its order providing for the method of allocating principal and income in future accounts. It is asserted that the order entered pursuant to this stipulation was res judicata as to the rights of the parties and that, in any event, the order and stipulation could be vacated only on motion or by an independent action. In considering the issues presented, it is necessary to examine the nature of the proceedings out of which this controversy arose.
1. As we have already indicated, the issue here arose in proceedings brought under § 501.35, which permits a trustee to petition the court for instructions in the administration of a trust and for settlement and allowance of its account. It provides that the court's order shall be "binding in rem upon the trust estate and upon the interests of all beneficiaries, vested or contingent," subject to appeal. The object of this section is to provide a practical and efficient method of giving the district court jurisdiction in rem whereby trustees may proceed to have their actions reviewed and a conclusive determination of their acts rendered. By this statute the court is given supervisory control over trustees. The purpose for such judicial guidance is to protect the trustees under circumstances where, in the opinion of competent lawyers, the meaning of the trust instrument may be in doubt or, as in this case, where there was uncertainty as to the proper application of the law. In re Trust Created by Will of Enger, 225 Minn. 229, 30 N.W.2d 694, 1 A.L.R.2d 1048; Hartzell v. Schuster, 257 Minn. 592, 100 N.W.2d 513; 3 Scott, Trusts (2 ed.) § 259; 54 Am.Jur., Trusts, § 282; In re Trust Under Will of Schultz, 215 Minn. 313, 9 N.W.2d 773; In re Living Trust Created by Atwood, 227 Minn. 495, 35 N.W.2d 736, 9 A.L.R.2d 1126.
2. We do not understand that this procedure was designed to create vested rights in beneficiaries. The statute is merely procedural and in no way detracts from the substantive law of trusts. Hartzell v. Schuster, supra. Since the trust beneficiary has no vested right in a rule of law or formula used to determine what is income for allocation purposes, In re Trust Under Will of Gardner, supra, and since the court's jurisdiction is continuing and supervisory, modification of instructions is completely consistent with the purpose of the procedure.
3. As we have indicated, the 1961 stipulation and order purported to establish a rule of law to govern in the future. We think that both the letter and the spirit of our decisions in In re Trust Under Will of Gardner, supra, and In re Trust Created by Warner, 263 Minn. 449, 117 N.W.2d 224, require affirmance of the trial court's determination that the manner of distributing income established by the 1961 stipulation and order should not have prospective application. In the Gardner case we said (266 Minn. 134, 123 N.W.2d 74):
"* * * The complexities and variations in modern corporate accounting for whatever reason they existpreclude the application of a rule of thumb by which it can be said that all stock dividends are necessarily income to a trustee in a trust accounting. If for no other reason, it should be held that, until the corporate earnings reach the trustee as true income, the beneficiary has no right to such earnings. Nor does the beneficiary have a vested right in the rule or formula by which it is determined what earnings are true income."
4. There are innumerable authorities which hold that res judicata is not a defense in a subsequent action where the law under which the first judgment was obtained is different from that applicable in the second actionas where there has been an intervening decision or a change in the law creating an altered situation. Wagner v. Baron (Fla.) 64 So. (2d) 267, 37 A.L.R.2d 831; 30A Am.Jur., Judgments, § 335. In In re Trust Created by Warner, 263 Minn. 449, 455, 117 N.W.2d 224, 228, we *547 said that the order allowing a final account of a trustee is final and conclusive as to all matters thereby determined and that it is res judicata "on the issues of fact involved in the hearing even if based on an erroneous theory of the law." We were careful to point out, however, that the theory of law applied in the first hearing can always be questioned in a subsequent hearing. We said (263 Minn. 456, 117 N.W.2d 229):
"We think that the correct analysis is that in a trust matter the issues actually settled in the hearing may not later be attacked after the time for appealing has expired but that an interested party is not precluded from contending in a subsequent accounting that an erroneous theory of law was applied in settling a prior account."
5. In vacating the 1961 stipulation and order, the trial court pointed out that it was not binding "on Katherine W. Erdall and Katherine W. Doerr and that their acceptance of the distribution already made by the trustee does not constitute a ratification of the stipulation but constitutes only a ratification of the distribution already made by the trustee, and no more." Under the circumstances of this case, it cannot be said that the order was a determination of the rights of the parties by which the remaindermen could be deprived of fundamental property rights. The so-called order merely recorded the agreement of appellant and the trustee bank. Had this been a truly adversary proceeding in which conflicting rights of the beneficiaries were litigated, the order and stipulation might lend some support to the contentions of appellant.
The memorandum of the trial court further pointed out:
"* * * [T]he stipulation provides that stock dividends issued by insurance companies, banks and holding companies shall be allocated one-half to corpus and one-half to income, there being no impairment of intact value (emphasis by Court). At no time has there been any agreement between the parties as to how intact value was to be figured or computed, and the problems that have confronted the courts of this country relative to how intact value was to be determined have produced many different opinions and caused immeasurable confusion to everyone concerned."
Moreover, the action of the trial court in refusing to apply prospectively a rule of law which was incorrect was warranted by the express instructions of this court in the Gardner case, even in the absence of a motion or an independent action on the part of the other beneficiaries. It is further apparent from the record that neither appellant nor the trustee has been prejudiced by reason of the court's action. Appellant has not demonstrated that there is any contractual basis for the rights which he asserts. The respondent trustee is unharmed because it affirmatively appears that the respondent beneficiaries have waived objections to distributions already made.
6. There appears to be some merit to the contention of appellant that the court erred in approving the trustee's method of amortizing premiums paid upon the acquisition of bonds held by the trust. The respondent trustee answers that this alleged error is more apparent than real and can be explained as a typographical error. We accordingly remand the matter to the trial court for correction or clarification of its order in this respect.
In view of the disposition we make, it is unnecessary to discuss the other points raised in appellant's brief.
Affirmed and remanded for correction or clarification of order relating to method of allocating amortization of bond premiums.
OTIS, J., took no part in the consideration or decision of this case.
NOTES
[1]  Since these two rules are discussed at length in In re Trust Under Will of Gardner, 266 Minn. 127, 123 N.W.2d 69, it is unnecessary to again review them in this opinion.
