In an action, inter alia, for a judgment declaring that the termination of the contract of nonparty Mordechai Tendler as the rabbi of the defendant Bais Knesses of New Hempstead, Inc., also known as Kehillat New Hempstead, the Rav Aron Jofen Community Synagogue is null and void, to reinstate him to his position, and to declare null and void the elections of the Board of Directors and the Board of Trustees of the defendant Bais Knesses of New Hempstead, Inc., also known as Kehillat New Hempstead, the Rav Aron Jofen Community Synagogue, sued herein collectively as Board of Directors and Trustees of Bais Knesses of New Hempstead, Inc., also known as Kehillat New Hempstead, the Rav Aron Jofen Community Synagogue, and to direct that new elections be held, the plaintiffs appeal from (1) an order of the Supreme Court, Rockland County *460(Berliner, J.), entered June 22, 2007, which granted that branch of the defendants’ motion which was pursuant to CPLR 3211 (a) (2) to dismiss the complaint for lack of subject matter jurisdiction, and (2) a judgment of the same court dated August 14, 2007, which, upon the order, is in favor of the defendants and against them, dismissing the complaint.
Ordered that the appeal from the order is dismissed, without costs or disbursements; and it is further,
Ordered that the judgment is modified, on the law, by deleting the provision thereof dismissing the fifth cause of action for a judgment declaring null and void the elections of the Board of Directors and Board of Trustees of the defendant Bais Knesses of New Hempstead, Inc., also known as Kehillat New Hemp-stead, the Rav Aron Jofen Community Synagogue, sued herein collectively as Board of Directors and Trustees of Bais Knesses of New Hempstead, Inc., also known as Kehillat New Hemp-stead, the Rav Aron Jofen Community Synagogue, and to direct that new elections be held; as so modified, the judgment is affirmed, without costs or disbursements, the fifth cause of action is reinstated, severed, and converted into a special proceeding pursuant to Not-for-Profit Corporation Law § 618 to determine the validity of the elections, and the plaintiffs are directed, to the extent not already accomplished, to provide notice of the special proceeding to the persons declared elected at the contested elections, and the order is modified accordingly.
The appeal from the intermediate order must be dismissed because the right of direct appeal therefrom terminated with the entry of judgment in the action (see Matter of Aho, 39 NY2d 241, 248 [1976]). The issues raised on the appeal from the order are brought up for review and have been considered on the appeal from the judgment (see CPLR 5501 [a] [1]).
The plaintiffs and the individual defendants are members or former members of the defendant Bais Knesses of New Hemp-stead, Inc., also known as Kehillat New Hempstead, the Rav Aron Jofen Community Synagogue (hereinafter KNH), a religious corporation, which was created to “be maintained as a Jewish Synagogue in accordance with traditional Jewish Law.” The congregation’s longstanding spiritual leader was nonparty Mordechai Tendler, a rabbi. In the wake of allegations of misconduct made against Rabbi Tendler, five members of the Board of Directors of KNH (hereinafter the Board of Directors) resigned, the remaining members of the Board of Directors appointed other people to fill the vacancies, and the newly-constituted Board of Directors suspended Rabbi Tendler. According to the defendants, this Board of Directors then *461submitted the matter to a duly-authorized rabbinical court (Bais Din), which issued a written verdict (Psak Din), determining that Rabbi Tendler was unfit to serve as a rabbi. Rabbi Tendler’s contract as the rabbi of KNH was subsequently terminated by resolution of the Board of Directors. The plaintiffs dispute the jurisdiction of the rabbinical court to which the matter was submitted and the validity of the Psak Din.
Following the termination of Rabbi Tendler’s contract, the annual membership meeting was held, at which time elections for the Board of Directors and the Board of Trustees were conducted (hereinafter the Board elections). The plaintiffs brought this action against, among others, KNH’s newly-elected Board of Directors and Board of Trustees, and several individual directors and trustees, inter alia, for a judgment declaring that the termination of Rabbi Tendler’s contract was null and void and to reinstate him to his position.
The Supreme Court correctly determined that it lacked subject matter jurisdiction over the plaintiffs’ first, second, third, fourth, and sixth causes of action, all involving the termination of Rabbi Tendler’s contract. Contrary to the plaintiffs’ contention, the matter involves more than secular provisions of the bylaws under which they challenge the Board of Directors’ resolution terminating Tendler’s contract (cf. Tendler v Bais Knesses of New Hempstead, Inc., 52 AD3d 500 [2008] [decided herewith]; Rector, Churchwardens & Vestrymen of Church of Holy Trinity v Melish, 3 NY2d 476 [1957]; Malankara Archdiocese of Syrian Orthodox Church in N. Am. v Thomas, 33 AD3d 887 [2006]). Rather, in the face of a finding by a rabbinical court that Rabbi Tendler was not fit to serve as the congregation’s rabbi and provisions in the bylaws and Rabbi Tendler’s contract indicating that the discontinuation of his services was to be decided “in accordance with Jewish law,” the issues presented cannot be decided solely upon the application of neutral principles of law. Consideration of the issues would require this Court to, at least implicitly, pass upon the validity of the determinations issued by ecclesiastical tribunals and Jewish law pursuant to which a rabbi’s services may be terminated. Thus, judicial resolution of these causes of action would inexorably entangle this Court in a religious controversy in violation of the Establishment Clause of the First Amendment of the United States Constitution (see Presbyterian Church in U.S. v Mary Elizabeth Blue Hull Memorial Presbyterian Church, 393 US 440, 448 [1969]; Kedroff v Saint Nicholas Cathedral of Russian Orthodox Church of North America, 344 US 94, 116 [1952]; Matter of Congregation Yetev Lev D’Satmar Inc. v *462Kahana, 9 NY3d 282 [2007]; First Presbyt. Church of Schenectady v United Presbyt. Church in U.S. of Am., 62 NY2d 110, 116 [1984], rearg denied 63 NY2d 676 [1984], cert denied 469 US 1037 [1984]; Sieger v Sieger, 297 AD2d 33, 34 [2002]; Sam v Church of St. Mark, 293 AD2d 663, 664 [2002]).
However, the fifth cause of action does not present a controversy that requires consideration of religious doctrine. Rather, that cause of action presents a challenge to the validity of the Board elections based upon, inter alia, the allegation that members of the congregation who had failed to pay their dues were allowed to vote, in contravention of the provision of KNH’s bylaws defining a voting member as a member “whose dues or financial obligations to the Synagogue are current.” Determining whether the individuals who voted in the contested elections paid their dues does not “require[ ] intrusion into constitutionally protected ecclesiastical matters,” as would, for example, “[a] decision as to whether or not a member is in good standing” (Matter of Congregation Yetev Lev D’Satmar Inc. v Kahana, 9 NY3d 282, 288 [2007]). Accordingly, the Supreme Court erred in determining that it did not have subject matter jurisdiction over the plaintiffs’ fifth cause of action (see Sillah v Tanvir, 18 AD3d 223, 224 [2005]; Matter of Venigalla v Alagappan, 307 AD2d 1041, 1041-1042 [2003]; Matter of Kaminsky, 251 App Div 132, 140-141 [1937], affd 277 NY 524 [1938]; see also Rector, Churchwardens & Vestrymen of Church of Holy Trinity v Melish, 3 NY2d 476 [1957]; Kelley v Garuda, 36 AD3d 593 [2007]; cf. Matter of Congregation Yetev Lev D’Satmar Inc. v Kahana, 9 NY3d 282 [2007]).
However, the authority of the courts to consider the validity of a corporate election is granted pursuant to Not-for-Profit Corporation Law § 618. This Court has held, under the companion provision of the Business Corporation Law (see Business Corporation Law § 619), that such a special proceeding is the “exclusive method available to a shareholder to test the validity of an election of a director” (Chiulli v Reiter, 130 AD2d 617, 618 [1987]; see Matter of Schmidt [Magnetic Head Corp.], 97 AD2d 244, 249 [1983]). Although the plaintiffs did not bring this action as a special proceeding pursuant to Not-for-Profit Corporation Law § 618, “[generally, where an action or proceeding is brought in the wrong form or under an inappropriate statute, the court, in its discretion, may deem it brought in a proper fashion, thus avoiding a dismissal” (Matter of Schmidt [Magnetic Head Corp.], 97 AD2d at 250; see CPLR 103 [c]; see also Port Chester Elec. Constr. Corp. v Atlas, 40 NY2d 652, 653 [1976]). Accordingly, we convert this action into a special *463proceeding pursuant to Not-for-Profit Corporation Law § 618 to determine the validity of the elections, and direct the plaintiffs, to the extent not already accomplished, to provide notice of the special proceeding to the persons declared elected at the contested elections. Although we convert this action into a special proceeding, we note that the statute requires that the special proceeding be brought by a “party aggrieved” by the contested elections (N-PCL 618), and we make no determination as to this issue. Mastro, J.P, Skelos, Florio and Dickerson, JJ., concur.