Order unanimously reversed, with costs and motion denied. Memorandum: Plaintiff’s complaint has been dismissed upon *626the ground that such determination was necessitated by the doctrine of res judicata. Plaintiff furnished materials and performed work under a subcontract with one Marsden who had contracted with defendant, school district, for the installation of a public improvement. When payment was refused plaintiff filed a mechanic’s lien but failed to commence an action to foreclose within the statutory period (Lien Law, § 18). Subsequently, another lienor commenced such an action. Plaintiff as an individual defendant in that action asserted in its answer a cross claim for affirmative relief upon the theory that the fund should be impressed with a trust for its benefit. (Lien Law, art. 3-A.) Following trial it was held that such a trust could only be enforced in a representative action and that the present plaintiff had no standing to maintain the cross claim as an individual. (Cf. New York Trap Rock Corp. v. National Bank, 285 N. Y. 825, 826.) This court affirmed the judgment entered thereon (Rappl & Hoenig Co. v. Central School Dist., 18 A D 2d 1137). Thereafter this action was commenced, which concededly is a representative one, brought for the benefit of a class of alleged trust beneficiaries. (Cf. Matter of Industrial Laundry Mach. Co., 3 A D 2d 843.) While the general rule is that “A judgment on the merits precludes another action based on the same foundation facts * * * even though a different theory for similar relief is set forth” this rule “is not to be confused with one where a plaintiff pursues an erroneous remedy and his complaint is dismissed because the remedy is unavailable as the wrong one.” In the latter event “ plaintiff is not barred from bringing another action pursuing the proper remedy.” (Eidelberg v. Zellermayer, 5 A D 2d 658, 663; see, also, 7 Carmody-Wait, New York Practice, pp. 483, 484.) In passing we note that the final decretal paragraph of the judgment in the prior action contains some broad language excluding the present plaintiff from any right to the fund but fairly construed this language is limited by the further statement that such exclusion was based on the failure to refile the lien. Furthermore, that judgment directed payment of the residue of the fund to the trustee in bankruptcy of the general contractor. The complaint herein, however, alleges that the fund continues in the possession of the school district. From statements contained in the briefs herein we take judicial notice of the fact that pursuant to order of Supreme Court entered September 13, 1963, the money has been deposited in court by the school district. Thus, it remains subject to the order of the court (CPLR 2606). Lastly, we find no merit to respondent’s contention that the action was not timely brought. The cross claim brought by appellant was sufficient to satisfy the requirements of former section 51-a of the Civil Practice Act. The present action was timely instituted (Civ. Plrac. Act, § 23). In conclusion, we advert to a troublesome point that is not raised by the respondent trustee herein. Ordinarily when a petition in bankruptcy has been filed the Bankruptcy Court has exclusive jurisdiction over a controversy concerning the assets in bankruptcy and questions concerning priorities, preferences, and the like and no action may be entertained by a State court without the consent of the trustee in bankruptcy, appropriately authorized by Bankruptcy Court. (Isaacs v. Hobbs Tie & T. Co., 282 U. S. 734, 737-738 [1931]; Thompson v. Magnolia Co., 309 U. S. 478, 483 [1940]; 4 Collier, Bankruptcy [14th ed.], par. 70.06.) There is authority that this rule will not necessarily apply if the funds or assets which are the subject of the controversy are not actually or constructively within the possession of the Bankruptcy Court. (2 Collier, Bankruptcy [14th ed.], par. 23.18, and eases cited.) Upon the facts heretofore stated it might be found that the fund is constructively in the possession of the trustee. The latter, however, has made this motion to dismiss and nowhere in his motion is this question raised. It would seem a fair inference therefrom that he has *627obtained proper permission to consent to the continuance of this case and its adjudication in the State Supreme Court. Moreover, there is some authority that the showing of consent must be alleged in the complaint. (Palmer v. Larchmont Manor Co., 284 N. Y. 288.) There the court said (p. 291) : “It is urged that the bankruptcy court could have consented to an adjudication of rights in this real property by our State courts upon proper application prior to the institution of the action. That, of course, is true, but such consent must be pleaded (Cornell v. Dakin, 38 N. Y. 253, 257) and no consent is pleaded here. It is urged, however, that, in fact, there exists such a consent. Bankruptcy proceedings in the Federal courts are not judicially noted in the State courts or, indeed, in any other than the initial court of bankruptcy. (See 23 C. J., p. 115 and cases cited.) In addition, when we read the alleged consent it is general and to be of efficacy in litigation such as this, it must be for a particular controversy. (Thompson v. Magnolia Petroleum Co., 309 U. S. 478, 483.) ” Minimally, it would appear that this issue should be clarified before the parties seek a judgment in State court that might not be binding on respondent trustee. (Appeal from order of Monroe Special Term dismissing the complaint.) Present — 'Williams, P. J., Bastow, Goldman, Noonan and Del Yecchio, JJ.