
74 P.3d 201 (2003)
ALASKA WILDLIFE ALLIANCE, Eastern Kenai Peninsula Environmental Action Association, Friends of McNeil River, and Kachemak Bay Conservation Society, Appellants,
v.
STATE of Alaska, and Tony Knowles, Governor of Alaska, Appellees.
No. S-10520.
Supreme Court of Alaska.
July 25, 2003.
*203 Thomas E. Meacham, Anchorage, for Appellants.
Sabrina E.L. Fernandez and Kevin M. Saxby, Assistant Attorneys General, Anchorage, and Bruce M. Botelho, Attorney General, Juneau, for Appellees.
Before: FABE, Chief Justice, MATTHEWS, EASTAUGH, BRYNER, and CARPENETI, Justices.

OPINION
EASTAUGH, Justice.

I. INTRODUCTION
The day after the superior court dismissed a complaint filed by public interest litigants, a second, substantially identical, complaint was filed. The superior court dismissed the second complaint on res judicata grounds, and awarded attorney's fees against the public interest litigants because it found the complaint was frivolous and brought in bad faith. We affirm the res judicata dismissal of the second complaint because we hold that the dismissal of the first complaint under Alaska Civil Rule 12(b)(6) was a decision on the merits. But we reverse the attorney's fees award because it was reasonably debatable whether res judicata barred the second complaint; it was therefore error to conclude that the second complaint was frivolous and filed in bad faith.

II. FACTS AND PROCEEDINGS
The Alaska Wildlife Alliance and several other environmental conservation groups (collectively, the alliance) first sued the Alaska Board of Game, the Commissioner of Fish and Game, and the Governor of Alaska in November 2000 to remedy the allegedly unlawful composition of the Board of Game's membership.[1]
The Board of Game oversees the conservation and development of Alaska's wild game resources. Its membership is governed by AS 16.05.221(b).[2] The governor appoints the seven board members subject to legislative confirmation. The only statutory qualifications for appointment to the board are an "interest in public affairs, good judgment, knowledge, and ability in the field of action of the board."[3] The statute also encourages the governor to consider "diversity of interest and points of view."[4]
In the November 2000 lawsuit (AWA I), the alliance claimed that the composition of the board violated the Alaska Constitution and AS 16.05.221(b) because all seven board members were hunters, trappers, hunting guides, or persons representing those interests.
The AWA I complaint asserted five causes of action. The first count alleged that the composition of the board violated what the alliance called the "requirement" in AS 16.05.221(b) of a diversity of interest and points of view. The second count alleged that the composition of the board violated the *204 common use section of the Alaska Constitution.[5] The third count asserted that the composition of the board violated the state's "trust duty and ... fiduciary obligation" under the common use section. The fourth count alleged that the failure to include members who were not hunters, hunting guides, or trappers violated the uniform application section of the Alaska Constitution.[6] The fifth count asserted that the common use section required membership by non-hunters proportionate to Alaska's non-hunter population, and that because no more than twenty-five percent of Alaskans were licensed hunters, hunting guides, or trappers, those groups combined should have no more than two of the seven seats on the board.
The alliance sought a judgment declaring that the board's composition violated AS 16.05.221(b) and the common use and uniform application sections of the Alaska Constitution. It also asked the superior court to transfer the board's regulatory authority over wildlife to the Alaska Department of Fish and Game until the board's membership met statutory and constitutional standards. Finally, the alliance asked the court to order that the board's membership be reconstituted via new gubernatorial appointments and legislative confirmations.
The state moved to dismiss the complaint under Alaska Civil Rule 12(b)(6) for failure to state a claim upon which relief may be granted.[7] The state argued: that the complaint presented a non-justiciable political question; that the complaint did not implicate the equal access and uniform application sections of the Alaska Constitution; that the complaint should be dismissed under principles of statutory interpretation; and that the issues raised by the alliance were based on false premises. On May 7, 2001 Superior Court Judge Peter A. Michalski granted the state's motion and dismissed the AWA I complaint under Rule 12(b)(6).
The next day counsel for the alliance filed a new complaint: Edgar P. Bailey v. State of Alaska and Tony Knowles, Governor (AWA II). Although the complaint was filed on May 8, 2001, it was not served on the state until July 9, 2001. Between those dates, the complaint was amended to substitute for Bailey the same plaintiffs who had brought AWA I. The amended complaint in AWA II alleged that the membership of the board violated AS 16.05.221(b), the common use and uniform application sections of the Alaska Constitution, and the state's trust duty and fiduciary obligation under the Alaska Constitution. The alliance sought declaratory relief but did not ask the superior court to reassign regulatory authority or to order the board reconstituted.
Meanwhile, on June 1, 2001, after AWA II was filed but before it was served, the superior court issued a written final judgment dismissing AWA I. Neither the oral ruling nor the written order included findings of fact, conclusions of law, or any other explanation of the court's reasoning.
On June 26, 2001 the superior court in AWA I denied the state's motion for attorney's fees. The court ruled that the plaintiffs were public interest litigants and that the suit was not frivolous. The court also stated that the procedure for appointing and confirming board members "is a political process."
The state then moved to dismiss AWA II under Rule 12(b)(6). The state advanced the same arguments it had made in its motion to dismiss the complaint in AWA I, but added that the AWA II complaint should also be dismissed on res judicata grounds.
Superior Court Judge John Reese granted the state's motion to dismiss AWA II on res judicata grounds because he held that the AWA I dismissal was on the merits. The court then awarded the state $4,000 in attorney's fees against the plaintiffs because it *205 found that the complaint in AWA II had been filed in bad faith and was frivolous.
The alliance appeals both the dismissal of AWA II and the award of attorney's fees in AWA II.

III. DISCUSSION

A. Standard of Review
Whether res judicata prevents a plaintiff from bringing an action presents a question of law that we review de novo.[8]
Complaints are to be liberally construed so that motions to dismiss are rarely granted.[9] To survive a Rule 12(b)(6) motion, a complaint only needs to show "a set of facts consistent with and appropriate to some enforceable cause of action."[10]
We review an award of attorney's fees for abuse of discretion.[11] An abuse of discretion exists if the award was "arbitrary, capricious, manifestly unreasonable, or [if it] stemmed from an improper motive."[12]

B. Res Judicata Bars the Alliance's Complaint.
Res judicata bars a subsequent action when a judgment in a prior action was "(1) a final judgment on the merits, (2) from a court of competent jurisdiction, and (3) in a dispute between the same parties (or their privies) about the same cause of action."[13]
The alliance argues that under Alaska Civil Rules 41(b) and 52(a), res judicata cannot apply because the superior court in AWA I did not issue a "reasoned decision." The alliance also claims that the dismissal of AWA I was based on jurisdictional grounds rather than on the merits. Finally, it claims that AWA I and AWA II involved different defendants and claims for relief.
The state argues that the superior court dismissed AWA I on the merits under Rule 41(b) and that res judicata therefore bars the AWA II complaint. The state also argues that the two complaints involved the same parties and causes of action.
1. The absence of findings of fact and conclusions of law does not prevent the AWA I dismissal from having res judicata effect.
The superior court in AWA I did not issue findings of fact or conclusions of law when it dismissed the complaint. The alliance argues that res judicata should not bar AWA II because there was no "reasoned decision" in AWA I. The alliance uses the "reasoned decision" shorthand to refer to an opinion containing findings of fact and conclusions of law. For simplicity we accept the alliance's terminology in our discussion, but in doing so, we do not intend to suggest that Judge Michalski's decision in AWA I was not "reasoned," despite its lack of findings of fact or conclusions of law.
The alliance bases its argument on its reading of the interplay between Alaska Civil Rules 52(a) and 41(b). Rule 52(a) states in part:
If an opinion or memorandum of decision is filed, it will be sufficient if the findings of fact and conclusions of law appear therein. Findings of fact and conclusions of law are unnecessary on decisions of motions under Rules 12 or 56 or any other motion except as provided in Rule 41(b).
Rule 41(b) states in part:
If the court renders judgment on the merits against the plaintiff, the court shall make findings as provided in Rule 52(a). Unless the court in its order for dismissal otherwise specifies, a dismissal ... other than a dismissal for lack of jurisdiction, for improper venue, or for failure to join a party ... operates as an adjudication upon the merits.
*206 The alliance argues that for a Rule 12 dismissal to be a judgment on the merits under Rule 41(b), the court must issue findings of fact and conclusions of law under Rule 52(a).
We do not read Rules 41(b) and 52(a) to require a court to issue findings of fact or conclusions of law for a dismissal decision to be on the merits. Rule 52(a) states that findings of fact and conclusions of law are not necessary for decisions made under Rule 12, except as provided in Rule 41(b). Rule 41(b) states that if a court renders a judgment on the merits, it shall make findings as required by Rule 52(a). But Rule 52(a) does not require findings of fact for Rule 12 dismissals. Furthermore, Rule 41(b) states that unless the court otherwise specifies or the decision is based on a lack of jurisdiction, a dismissal operates as an adjudication on the merits. Here, the court did not "otherwise specify," and, for reasons we will discuss, the dismissal was not based on a lack of jurisdiction. The dismissal of AWA I was an adjudication on the merits, notwithstanding the absence of findings of fact and conclusions of law. The absence of findings of fact and conclusions of law does not prevent the application of res judicata to the AWA I dismissal.
The alliance invokes Usibelli Coal Mine, Inc. v. State, Department of Natural Resources in support of its argument that res judicata cannot apply in the absence of a "reasoned decision."[14] We held in Usibelli that res judicata did not apply if a prior decision did not address or consider one of the plaintiff's arguments.[15] We relied on the RESTATEMENT (SECOND) OF JUDGMENTS and identified several indicia that a prior judgment was final: "that the parties were fully heard, that the court supported its decision with a reasoned opinion, [and] that the decision was subject to appeal or was in fact reviewed on appeal."[16] The alliance emphasizes the "reasoned opinion" factor. But Usibelli did not say that all the factors had to be present for res judicata to apply. Moreover, Usibelli listed those factors to determine whether a decision is final, not whether it was on the merits.
The alliance also looks to federal case law. The federal courts typically require trial courts to issue reasoned decisions explaining their rulings. The alliance points to Couveau v. American Airlines, Inc., in which the plaintiff appealed a grant of summary judgment for the defendant.[17] Res judicata was not an issue. The defendant moved for summary judgment on several grounds, and the trial court granted summary judgment without explaining its reasoning or indicating which of the defendant's arguments it found persuasive.[18] The United States Court of Appeals for the Ninth Circuit explained that "when multiple grounds are presented by the movant and the reasons for the district court's decision are not otherwise clear from the record, [we] may vacate a summary judgment and remand for a statement of reasons."[19] But the court in Couveau did not say that a reasoned decision must be issued in order for a decision to be treated as being on the merits. Moreover, a review of the entire record here permits us to ascertain the basis for the superior court's dismissal in AWA I.
In most cases involving dismissal or summary judgment, the grounds for the superior court's ruling can be discerned from the parties' motion papers. As we noted above, "findings of fact and conclusions of law are unnecessary on decisions of motions under Rules 12 or 56."[20] We agree with the implied reasoning of the Ninth Circuit in Couveau that a trial court addressing multiple theories for dismissal or summary judgment should always identify the grounds for its ruling with sufficient clarity to permit meaningful appellate review. But here, even though the AWA I dismissal order did not *207 explain the reason for dismissal, we can infer the court's reasons for the AWA I dismissal from its subsequent opinion denying the state's attorney's fees motion. We do not want to discourage superior courts from explaining their reasons for granting relief under Rule 12(b)(6). But in this case, Judge Michalski's attorney's fees order in AWA I permits us, in considering whether res judicata barred AWA II, to determine why the superior court dismissed AWA I.
2. A ruling on justiciability is not a ruling on jurisdiction.
Alaska Civil Rule 41(b) states that "[u]nless the court in its order for dismissal otherwise specifies, a dismissal ... other than a dismissal for lack of jurisdiction ... operates as an adjudication on the merits."[21] The court's order in AWA I did not specify that it was not a dismissal on the merits. The alliance argues that the court dismissed AWA I for raising a political question, and that this basis for dismissal is jurisdictional.
The alliance correctly notes that we have taken a broad view of the meaning of "jurisdiction" in context of Rule 41(b). In Blake v. Gilbert we interpreted jurisdiction "to include preconditions and other initial bars to suit, where the defendant has not yet incurred any significant prejudice."[22]
A claim implicates the political question doctrine when there is "(1) a textually demonstrable commitment of the issue to a coordinate political department; (2) the impossibility of a court's undertaking an independent resolution of the case without expressing lack of respect due coordinate branches of government; and (3) the need for adherence to a political decision already made."[23] We also consider whether there are any "judicially discoverable and manageable standards for resolving the issue."[24]
The alliance argues that the political question doctrine is a jurisdictional matter because "[i]t cares not about the substantive merits of a lawsuit." But in Baker v. Carr the United States Supreme Court classified the political question doctrine as an issue of justiciability.[25] The Court then distinguished jurisdiction from justiciability:
In the instance of nonjusticiability, consideration of the cause is not wholly and immediately foreclosed; rather, the Court's inquiry necessarily proceeds to the point of deciding whether the duty asserted can be judicially identified and its breach judicially determined, and whether protection for the right asserted can be judicially molded. In the instance of lack of jurisdiction the cause either does not "arise under" the Federal Constitution, laws or treaties (or fall within one of the other enumerated categories of Art. III, § 2), or is not a "case or controversy" within the meaning of that section; or the cause is not one described by any jurisdictional statute.[[26]]
We agree that the political question doctrine is more than jurisdictional and is instead a substantive basis for a dismissal. Although we give a broad meaning to "jurisdiction" for purposes of Rule 41(b) involuntary dismissals, that view is designed to allow plaintiffs to remedy defects that prevent a court from reaching the merits of a complaint.[27] But when the merits raise a political question, the defect is not curable. The superior court's dismissal of AWA I was not a dismissal for lack of jurisdiction. Under Rule 41(b), the dismissal was an adjudication on the merits.
*208 3. AWA I and AWA II involve the same parties and claims.
Res judicata applies when two cases involve the same parties or their privies and the same causes of action.[28] The alliance argues that the differences between the AWA I and AWA II defendants and claims for relief were sufficient to avoid res judicata.
The alliance first asserts that the parties are different because it sued the Board of Game and the Commissioner of Fish and Game in AWA I but it did not sue those defendants in AWA II. But in AWA II the alliance simply replaced lesser state entities with the State of Alaska. And in both cases the alliance sued the Governor of Alaska. Res judicata is not defeated by substituting one state entity for another when the claim is based on the same conduct, and when the same defense of non-justiciability applies regardless of which specific state entity is named as a defendant.
The alliance next argues that the causes of action in the two cases differed considerably because the alliance dropped its request that the court transfer the board's regulatory authority to the Commissioner of Fish and Game until the defendants re-constituted the board's membership. But the court in AWA I dismissed all of the alliance's causes of action and claims for relief, not merely the request for injunctive relief. The remaining claims in AWA II are the same as in AWA I. Deleting one request for relief did not alter the underlying causes of action.
C. It Was Error To Award Attorney's Fees Against the Alliance.
In AWA II the superior court awarded $4,000 as partial attorney's fees under Alaska Civil Rule 82 against the alliance plaintiffs because it determined that the second complaint was frivolous and brought in bad faith. The alliance argues that it was an abuse of discretion to award fees because the complaint was neither frivolous nor brought in bad faith. We agree.
We have held that under Rule 82, "it is an abuse of discretion to award attorney's fees against a losing party who has in good faith raised a question of genuine public interest before the courts."[29] But fees may be awarded against a public interest plaintiff if the claim is frivolous or brought in bad faith.[30]
The order awarding fees identifies three reasons for deciding that the complaint in AWA II was frivolous and brought in bad faith. First, it states that the action was previously dismissed with prejudice and that the alliance was barred from refiling the complaint under res judicata. Second, it finds that the complaint "was subject to a number of obvious affirmative defenses which [the alliance] failed to address or present any good faith argument for overcoming." Finally, it states that the alliance "made no effort to explain or justify [its] attempt to collaterally attack the ruling of the prior court on this matter and [it] presented no good faith authority or argument for overcoming the application of res judicata in this matter."
We are not persuaded that the filing of AWA II demonstrates bad faith. It was reasonably debatable whether the first complaint had been dismissed on the merits. Although we held above that the alliance's second complaint was barred by res judicata, this result was not so self-evident that the filing of AWA II indicates bad faith.
We are also not persuaded that the alliance failed to address several obvious affirmative defenses in its response to the motion to dismiss AWA II. The state argues that the alliance "conceded or did not really address" five affirmative defenses that the state raised in its motion to dismiss AWA II, and that therefore the alliance's claims were frivolous and brought in bad faith. But the alliance's *209 opposition to the motion to dismiss did respond, at least in some way, to each of the affirmative defense arguments. Its responses may have been less than exhaustive, but they were sufficient to preclude a finding of bad faith.
Finally, we are unpersuaded by the order's statement that the alliance "made no effort to explain or justify [its] attempt to collaterally attack the ruling of the prior court on this matter and [it] presented no good faith authority or argument for overcoming the application of res judicata in this matter." The question whether res judicata attached to the dismissal in AWA I was reasonably debatable, even though we have ruled for the state on that issue. Moreover, the alliance was not attempting to collaterally attack the dismissal of AWA I. Instead, it assertedin good faith but ultimately unpersuasively that the parties and claims in AWA II were different from AWA I, and that AWA I was not dismissed on the merits.
It is true that the AWA II complaint was filed the day after the AWA I complaint was dismissed, and that the alliance did not appeal the AWA I dismissal or ask the superior court to explain its reasoning. But the course the alliance chose to follow does not demonstrate bad faith or that the claim was frivolous. Just because a complaint is found to raise a political question does not necessarily mean it was frivolous. That a complaint is deemed barred by res judicata does not necessarily mean that it was filed in bad faith. We hold that it was error to award the state attorney's fees against these public interest litigants. This result moots the alliance's claim that it was error to deny its motion for reconsideration of the attorney's fees award.

IV. CONCLUSION
We therefore AFFIRM the order of the superior court granting the state's motion to dismiss on res judicata grounds, but VACATE the order awarding attorney's fees and REMAND for correction of the judgment.
NOTES
[1]  Alaska Wildlife Alliance v. Alaska Bd. of Game, No. 3AN-00-12369 CI (Alaska Super., June 1, 2001).
[2]  AS 16.05.221(b) provides in part:

For purposes of the conservation and development of the game resources of the state, there is created a Board of Game composed of seven members appointed by the governor, subject to confirmation by a majority of the members of the legislature in joint session. The governor shall appoint each member on the basis of interest in public affairs, good judgment, knowledge, and ability in the field of action of the board, and with a view to providing diversity of interest and points of view in the membership. The appointed members shall be residents of the state and shall be appointed without regard to political affiliation or geographical location of residence.
[3]  Id.
[4]  Id.
[5]  "Common Use. Wherever occurring in their natural state, fish, wildlife, and waters are reserved to the people for common use." Alaska Const. art. VIII, § 3.
[6]  "Uniform Application. Laws and regulations governing the use or disposal of natural resources shall apply equally to all persons similarly situated with reference to the subject matter and purpose to be served by the law or regulation." Alaska Const. art. VIII, § 17.
[7]  Alaska Civil Rule 12(b)(6) provides: "[T]he following defenses may at the option of the pleader be made by motion: ... (6) failure to state a claim upon which relief can be granted."
[8]  Dixon v. Pouncy, 979 P.2d 520, 523 (Alaska 1999); Renwick v. State, Bd. of Marine Pilots, 971 P.2d 631, 633 (Alaska 1999).
[9]  Odom v. Fairbanks Mem'l Hosp., 999 P.2d 123, 128 (Alaska 2000).
[10]  Id.
[11]  Tenala, Ltd. v. Fowler, 993 P.2d 447, 449 (Alaska 1999).
[12]  Id.
[13]  Plumber v. Univ. of Alaska Anchorage, 936 P.2d 163, 166 (Alaska 1997).
[14]  921 P.2d 1134, 1142 (Alaska 1996).
[15]  Id.
[16]  Id. (quoting RESTATEMENT (SECOND) OF JUDGMENTS § 13 cmt. g (1982)).
[17]  218 F.3d 1078 (9th Cir.2000).
[18]  Id. at 1081.
[19]  Id.
[20]  Alaska R. Civ. P. 52(a); see also Christensen v. NCH Corp., 956 P.2d 468, 477 (Alaska 1998).
[21]  Alaska R. Civ. P. 41(b).
[22]  702 P.2d 631, 636-38 (Alaska 1985).
[23]  Malone v. Meekins, 650 P.2d 351, 357 (Alaska 1982).
[24]  State, Dep't of Natural Res. v. Tongass Conservation Soc'y, 931 P.2d 1016, 1019 (Alaska 1997) (quoting Baker v. Carr, 369 U.S. 186, 217, 82 S.Ct. 691, 7 L.Ed.2d 663 (1962)).
[25]  369 U.S. 186, 198, 208-37, 82 S.Ct. 691, 7 L.Ed.2d 663 (1962).
[26]  Id. at 198, 82 S.Ct. 691.
[27]  See, e.g., Blake v. Gilbert, 702 P.2d 631, 637-38 (Alaska 1985) (ruling dismissal of corporation's complaint for lack of capacity to sue based on failure to pay taxes and file annual report was jurisdictional and not bar to subsequent suit by shareholder in privity with corporation bringing same cause of action).
[28]  Id. at 634-35.
[29]  Eyak Traditional Elders Council v. Sherstone, Inc., 904 P.2d 420, 422 (Alaska 1995).
[30]  Cabana v. Kenai Peninsula Borough, 21 P.3d 833, 837 (Alaska 2001) ("frivolous claims preclude public interest litigant status"); Municipality of Anchorage v. Citizens for Representative Governance, 880 P.2d 1058, 1062 (Alaska 1994) ("Public interest litigants must file and pursue their suit in good faith.").
