KRS 64.255 authorizes the payment of salaries to magistrates for the performance of duties incident to the exericse of criminal jurisdiction. It became effective March 28, 1958. On April 8, 1958, the Perry Fiscal Court adopted orders setting the salaries of its magistrates at $200 per month and dispensing with all further compensation on a per diem basis. Because the validity of the statute was elsewhere in litigation, the county treasurer declined to pay these salaries, and on December 16, 1958, the individual magistrates brought suit against him in the Perry Circuit Court to enforce payment. Answer was filed the next day and, by agreement, the cause was submitted for judgment forthwith on the pleadings. Judgment for the plaintiffs was entered on December 17, 1958, and became final without appeal.
On June 19, 1959 (rehearing denied December 11, 1959), in a case arising from Harlan County, this court held the statute valid but struck down an order of the Harlan Fiscal Court fixing monthly salaries for its magistrates for the reason that it purported to entitle all of the magistrates to the salary without reference to performance of the criminal court duties contemplated by KRS 64.255. Smith v. Harlan County Fiscal Court, Ky.1959, 329 S.W.2d 61. Despite this ruling the Perry Fiscal Court has continued to abide by its order of April 8, 1958, and, in this suit by certain taxpayers against the individual magistrates and former magistrates who have received the salaries, and against the various officers of the county in their official capacities, the defendants were successful below on their plea that the judgment of December 17, 1958, was res judicata. The taxpayers appeal.
In Smith v. Campbell, Ky.1955, 286 S.W. 2d 532, taxpayers brought suit against individual magistrates and the county treasurer to recover of the magistrates lump sum expense payments received by them pursuant to a 1946 resolution of the Harlan Fiscal Court and to enjoin the treasurer from making further payments. Theretofore, in 1935, in an action between the county attorney and the fiscal court, the Harlan Circuit Court had adjudged similar previous resolutions to be valid, and this judgment was pleaded as res judicata. In 1950, however, a statute (KRS 64.710) had been enacted barring lump sum expense payments. This court held that the 1935 judgment was conclusive as to all payments made prior to the effective date of the 1950 act but not as to those made thereafter, because “the 1935 judgment did not pass on the legal question presented by the 1950 statute.”
The case now before us is analogous to Smith v. Campbell except that the legal event intervening between the pleaded judgment and the new action was a court decision rather than a statute.
“In accordance with the general rule * * * that the estoppel of a judgment extends only to the facts and conditions as they were at the time the judgment was rendered, it has been broadly held that res judicata is no defense where, between the time of the first judgment and the second, there has been an intervening decision or a change in the law creating an altered situation.” 50 C.J.S. Judgments § 650, p. 95; State Farm Mutual Auto. Ins. Co. v. Duel, *4581945, 324 U.S. 154, 162, 65 S.Ct. 573, 89 L.Ed. 812.
Certainly the December 17, 1958, judgment of the Perry Circuit Court concluded the rights of the parties as to what was payable at the time, and until Smith v. Harlan County Fiscal Court, supra, was decided by this court they had reason to rely on its continued application in futuro. But it would hardly be in keeping with sound policy to say that an erroneous judgment must or can fix in perpetuity the rights and liabilities of parties in such a continuing relationship as exists between the public and its officers. The pay of magistrates in Perry County cannot, by virtue of this judgment, be governed forever by a law contrary to that which applies in the rest of the Commonwealth. We hold that the judgment of December 17, 1958, ceased to operate as res judicata (or, as it is sometimes called, as a collateral estoppel) on December 11, 1959, the date on which the mandate in Smith v. Harlan County Fiscal Court was issued.
The fiscal court action of April 8, 1958, was in the form of two motions separately passed and approved. The first was to the effect “that the Magistrates salaries be set at $200.00 per month effective Apr. 8, 1958.” On its face it was a blanket authorization of the monthly salaries for all the magistrates, not qualified or contingent on the performance of duties incident to the exercise of criminal court functions. The second motion was to the effect “that the Perry Fiscal Court be called together at any time without per diem pay, and that they be paid salaries only” (emphasis added), clearly indicating that the salaries were intended as compensation for all the services of the magistrates, whereas the statute (KRS 64.255) limits such compensation exclusively to the performance of criminal court functions. As the statute confers no authority to make a flat substitution of salaries in lieu of other compensation, which these orders purported to do, they were void. Smith v. Harlan County Fiscal Court, supra.
That the order fixing the salaries was void does not, however, necessarily make the subsequent payments illegal and thus subject to recovery in a collateral proceeding. “The rule is that if there is no authority of law for the payment of a claim, the order making the allowance is void, and the money paid may be recovered in a direct proceeding by proper officers of the county, or by a citizen and taxpayer upon their failure to sue after demand, and for the same reason payment may be resisted * * * but if there is authority of law for the payment, the order of the fiscal court making the allowance is not void and the only relief is by appeal.” Bell Fiscal Court v. Helton, 1935, 258 Ky. 219, 79 S.W.2d 683 (allowance to jailer for labor and expenses over the period of a fiscal year); Estill County v. Wallace, 1927, 219 Ky. 174, 292 S.W. 816 (payment of $5,000 to county treasurer for special services). And if the payment is made for services actually performed which the fiscal court had the power to authorize in the first instance it cannot be recovered:
“If the thing done had been illegal, or not warranted by law, however beneficial it might have been, the public ought not to be estopped to deny the validity of the expenditure; or, where the thing is authorized, but it is proposed to do it in an unauthorized manner, upon seasonable complaint [emphasis added] those charged with doing the thing will be compelled to execute it as the law directs, and prohibited from doing it otherwise. But where the thing is authorized to be done, and is done by the body charged with doing it, but done in a manner contrary to that directed by the statute, the court will not compel the official to pay back the money and let the public continue to enjoy the benefits of its expenditure. If it is made to appear that the expenditure was in good faith, and the public has got that which it was entitled to, good conscience forbids the recovery. The law therefore denies it.” O’Rear, J., in Flowers *459v. Logan County, 1910, 138 Ky. 59, 127 S.W. 512, 514, 137 Am.St.Rep. 347. See also Thomas v. O’Brien, 1910, 138 Ky. 770, 129 S.W. 103, 104 (cited with approval in Trimble County v. Moore, Ky.1958, 312 S.W.2d 623, 626) wherein the court said, “We think that it was not illegal for the court to enter an order after the work was done ordering it to be paid for. What the court could have done before, it had the power to do later.”
KRS 64.255 provides statutory authority under which these salaries could have been paid to those of the magistrates who actually performed the duties incident to the exercise of their criminal jurisdiction. The answer pleads that each of them did so, maintaining suitable offices for that purpose and carrying out the various requirements of law with respect to hearings and trials, collections, reports and account-ings. It pleads also that the salaries were included in the annual budgets, which were approved by the State Local Finance Officer and publicly advertised as required by KRS 68.260. As the case was submitted by agreement for judgment on the pleadings following a motion to strike each and every paragraph of the answer, we understand that these allegations are to be taken as true. The record does not disclose whether the salary disbursements were made pursuant to itemized payroll orders, as would ordinarily be necessary in order to validate them on the theory of ratification. However, the void orders of April 8, 1958, together with the subsequent formal actions of the fiscal court in adopting its annual budgets, provide a sufficient record that the payments were made at the direction of the fiscal court in its official capacity as the county’s governing body.1 There being no question of bad faith, it is therefore our conclusion that the payments cannot be recovered.2
The institution of this action, however, was a ‘“seasonable complaint” putting the various appellees on notice that payments were being made in a manner contrary to law. That portion of the judgment of the circuit court which directs the county clerk to issue vouchers to magistrates for salaries claimed after notice of filing of this action and for the county treasurer to honor and pay such vouchers is erroneous and to that extent is reversed.
The judgment is affirmed in part and reversed in part, with directions that it be amended in accordance with this opinion.
. Cheshire v. City of Frankfort, Ky.1954, 272 S.W.2d 37, 39, does not apply because the payroll orders in that case were held not to evince a conscious intent to increase the cumulative maximum compensation of the officer involved. KRS 64.530(1), requiring that any change in the rate of compensation for elected county officers be effected no later than the first Monday in May in the year in which they were elected, does not apply either, because as to the justices incumbent on March 28, 1958, KRS 64.-255(2) expressly provides otherwise, and as to those who took office thereafter the principle is that where the law authorizes a special allowance to an officer for duties he is performing, and the legislative body has not so provided before he takes office, it may do so at any time thereafter. Robinson v. Elliott County Fiscal Court, 1930, 236 Ky. 63, 32 S.W.2d 554, 555.
. The cases of Trimble County v. Moore, Ky.1958, 312 S.W.2d 623, Breathitt County v. Hagins, 1925, 211 Ky. 391, 277 S.W. 469, and Logan County v. Head, 1924, 206 Ky. 97, 266 S.W. 883, in which the principle of Flowers v. Logan County, supra, was held inapplicable to payments made to officers of the fiscal court, are distinguishable by the significant circumstance that in each of them the transactions were in violation of law and could not have been validly authorized in the first instance.