This is an appeal from an order of the Board of Tax Appeals sustaining an assessment of additional inheritance tax against the estate of Alma M. Kerschen in the amount of $17,127.72. Finding no error, we affirm.
This appeal actually involves the handling of the estates of Alma Kerschen and Verona Mollinger, who were sisters. Kerschen and Mollinger owned between them 90% of the stock of the Citizens State Bank of Marysville, Kansas. Mollinger died on December 29, 1982. She named her sister Alma Kerschen as her executor and sole heir. Alma died July 1, 1983, before Verona’s estate was closed. The executor of Alma’s estate succeeded her as executor d.b.n. in Verona’s, estate and served as executor of both estates until Verona’s estate was settled in July of 1986.
Verona Mollinger’s will provided that:
(1) the executor was to pay all expenses and just debts;
(2) all property, both real and personal, was devised and bequeathed to Alma Kerschen;
(3) Alma was appointed executor of the will and was authorized to sell any and all property without court approval.
Verona Mollinger held 812 shares of Citizens State Bank stock in her own name, which was to pass to Alma Kerschen under the will, and held 634 shares of Citizens State Bank stock in joint tenancy with Alma Kerschen. The stock was valued at $360 per share. It was included in the probate proceedings and the estate tax returns, at full value, without any charge or lien against it.
Verona Mollinger’s will directed the executor to pay all just debts and gave him authority to sell any and all estate property in order to do so. After all of the property in the probate estate had been exhausted to pay debts, expenses, and taxes, only the 812 Citizens State Bank shares remained to retire the $53,265 debt still owned by Verona Mollinger’s estate. Instead of selling sufficient shares of stock to raise the $53,265, the executor transferred the shares intact to Alma Kerschen’s estate, subject to a $53,265 lien. Ultimately, Verona Mollinger’s debts were paid out of the assets of Alma Kerschen’s estate.
The bank stock in Alma Kerschen’s estate was originally valued at $600 per share. The IRS valued the stock at $905 a share, with a final negotiated valuation of $650 per share placed on the stock. The basis of this higher valuation was the fact that Alma Kerschen’s estate held the majority of outstanding shares, some 3,526 shares.
*372The Internal Revenue Service refused to allow the $53,265 as a lien against the Citizens State Bank stock, and instead treated it as a general expense of Alma Kerschen’s estate. This determination was forwarded to the Kansas Department of Revenue, which eventually determined that an additional amount of $17,127.72 in inheritance tax should be assessed. It is this assessment which is the subject of this appeal. (The IRS audit increased the value of all the stock and did not allow the $53,265 debt to be used to decrease the value of the 812 shares inherited by the beneficiaries of Alma Kerschen’s estate. Thus, after the federal audit, the Kansas Department of Revenue reevaluated the estate and assessed an additional $25,117.04, which was reduced to $17,127.72 after negotiation.)
The director found that no lien on the stock existed, but that the “lien theory” was a fiction devised as an attempt to do post-mortem estate planning and to avoid paying Kansas inheritance tax on the stock. The order further stated that the executor of Verona Mollinger’s estate had failed to properly discharge his fiduciary duty to her estate by not selling property to pay her debts as directed in the will.
The executor argued that the $53,265 should reduce the value of the shares inherited by the heirs of Alma Kerschen. The director found that Verona Mollinger’s debt became Alma Kerschen’s general debt and that Kansas law requires that debts be paid out of the residue of an estate. Therefore, the amount could not be attributed to shares of stock because they were specific bequests which had to be taken from the property available to the residuary beneficiaries. The director’s order noted that there was no authority in Kansas law for what had been attempted by the executor, but that a family setdement agreement might have been a viable option. However no such agreement was drafted or executed.
The Board of Tax Appeals sustained the director’s assessment in all respects, and further denied the executor’s request for a rehearing. The executor appeals.
The scope of review of a decision made by the Board of Tax Appeals is the same as that for decisions made by other administrative tribunals. An appellate court is limited to considering whether, as a matter of law, (1) the tribunal acted fraudulently, *373arbitrarily, or capriciously; (2) the administrative order is substantially supported by the evidence; and (3) the tribunal’s action was within the scope of its authority. Board of Johnson County Comm’rs v. St Joseph Hosp., 241 Kan. 613, 613-14, 738 P.2d 454 (1987).
Verona Mollinger’s will directed that all her expenses and just debts be paid. Under K.S.A. 59-1405, when a will designates the property to be appropriated for the payment of debts or other items, it shall be applied to such purpose.
K.S.A. 59-1407 also required the executor of Verona Mollinger’s estate to sell the stock necessary for payment of her debts. The rights of creditors are superior to those of the heirs or legatees, and the claims of creditors must be paid before distribution is made to the heirs or legatees. 31 Am. Jur. 2d, Executors and Administrators § 464. Furthermore, an executor’s duty is to the estate, not to the heirs or legatees of that estate. Quinlan v. Leach, 5 Kan. App. 2d 706, 708, 623 P.2d 1365 (1981).
The executor’s theory was to distribute the property from Verona Mollinger’s estate to Alma Kerschen without paying Verona’s debts, and then to use the money the residuary beneficiaries would have received under Alma Kerschen’s will to pay the debts or taxes owed by Verona Mollinger’s estate. Besides being inconsistent with the executor’s duty to the Verona Mollinger estate, this theory also ignores the fact that the Department of Revenue and the Board of Tax Appeals must examine the decisions of the executor and determine what the actual tax liability is, or ought to be.
The Director of Revenue has the duty to examine an inheritance tax return and determine the correct amount of tax liability. K.S.A. 79-1575.
At the time the additional inheritance taxes were assessed, there was no documentation or written agreement making the stock liable for the expenses. Two days before the stock which was the subject of the “lien” was distributed to them, the residuary beneficiaries executed a “security agreement.” This was executed two years after the executor first maintained that a lien existed and three days prior to a hearing before the Director of Taxation, where the validity of the lien was to be contested.
We are persuaded, as was the Board of Tax Appeals, that there was substantial competent evidence supporting the decision of *374the Director of the Kansas Department of Revenue to treat the estate tax liability of Verona Mollinger as a general debt of Alma Kerschen’s estate.
The executor next maintains that the orders issued by the magistrate judge that the stock should be subject to the lien are binding orders which prohibit the Department of Revenue from disallowing the lien in assessing additional tax. We disagree. The Department of Revenue is not bound by the orders of the probate court for the purposes of determining the correct amount of inheritance tax due.
The orders for distribution and settlement of the estate, stating that the stock was subject to a lien, were submitted to the district magistrate judge after the additional $17,127.72 tax was assessed. The Kansas Department of Revenue was not a party to the probate proceedings and was not given notice or represented at the proceedings. The orders of partial distribution in the journal entry of final settlement were typed by the executor’s law firm and merely signed by the district magistrate judge. There is no indication that the magistrate judge was aware of the inheritance tax dispute or considered it before signing the orders. Under these circumstances, we conclude that the executor’s argument should fail.
Affirmed.