delivered the opinion of the court:
This case arises from the payment of a $3 penalty for a parking ticket by the plaintiffs. In addition to the penalty, plaintiffs were charged and paid a fine which was the subject of litigation in the related cases People ex rel. Daley v. Datacom System Corp. (1992), 146 Ill. 2d 1, and Horn v. City of Chicago (7th Cir. 1988), 860 F.2d 700. These cases supply the background about the parking tickets.
Plaintiffs filed a two-count amended complaint that alleged the city, Cook County, and Datacom were unjustly enriched and violated the Consumer Fraud and Deceptive Business Practices Act (Consumer Fraud Act) (Ill. Rev. Stat. 1985, ch. 121½, par. 261 et seq.) by collecting a $3 penalty from each plaintiff. Each defendant filed a motion to dismiss under section 2 — 615 of the Code of Civil Procedure (Ill. Rev. Stat. 1991, ch. 110, par. 2 — 615), which the trial court granted. In doing so, the court made two rulings.
We affirm the court’s first ruling that plaintiffs failed to state a cause of action under count I for unjust enrichment as to defendants Datacom and the city and under count II for violation of the Consumer Fraud Act as to Datacom. Plaintiffs do not appeal the ruling dismissing the city and Cook County under count II. We reverse the court’s second ruling that the plaintiffs’ complaint is an impermissible collateral attack.
When ruling on a section 2 — 615 motion, the trial court must consider only the allegations of the complaint (Baughman v. Martindale-Hubbell, Inc. (1984), 129 Ill. App. 3d 506), and all facts properly pleaded must be taken as true (Fitzgerald v. Chicago Title & Trust Co. (1978), 72 Ill. 2d 179, 187). Regardless of the reasoning of the trial court, we may affirm its judgment if correct. Material Service Corp. v. Department of Revenue (1983), 98 Ill. 2d 382, 387.
To state a cause of action for unjust enrichment, a plaintiff must allege the defendant received and unjustly retained a benefit. Drury v. County of McLean (1982), 89 Ill. 2d 417, 425-26.
The allegation of count I with respect to the City is:
"[T]he City benefited from the defendants’ aforesaid conduct because the County was demanding that the City pay the County three dollars for every ticket that was paid regardless of what amount the City received in payment and regardless of whether an additional three dollar fee was obtained in addition to money received as fines.”
This allegation is insufficient to state a cause of action for unjust enrichment. Plaintiffs fail to allege that the city received or retained any portion of the $3 penalty.
The allegation of count I with respect to Datacom is:
"Datacom benefitted from the defendants’ aforesaid conduct because it received a percentage of the money that it collected.”
This allegation alone is also insufficient. Plaintiffs must allege specific facts in support of their claim. (See Teter v. Clemens (1986), 112 Ill. 2d 252, 256-67.) Here, although plaintiffs allege that Datacom received a percentage of the money collected, they fail to allege that Datacom received and retained a percentage of the $3, which is the subject of this lawsuit.
As to count II, we find that plaintiffs lack standing to bring an action alleging a violation of the Consumer Fraud Act because they are not consumers. In Steinberg v. Chicago Medical School (1977), 69 Ill. 2d 320, the court noted that the Consumer Fraud Act is " 'An Act to protect consumers and borrowers and businessmen against fraud, unfair methods of competition and unfair or deceptive acts or practices in the conduct of any trade or commerce ***.’ A 'consumer’ is 'any person who purchases or contracts for the purchase of merchandise ***.’ ” (Steinberg, 69 Ill. 2d at 328, quoting Ill. Rev. Stat. 1973, ch. 121½, par. 261(e).) The court held that the Consumer Fraud Act did not apply to the plaintiffs action because plaintiff and those he represented were applicants to a medical school, not consumers.
In the related case of Daley, the court allowed the plaintiffs Consumer Fraud Act count to withstand a section 2 — 615 motion. The Daley court distinguished Steinberg on the grounds that the plaintiff in Daley was the State’s Attorney, who "is not limited regarding whose interests she or he may seek to protect.” Daley, 146 Ill. 2d at 31.
Here, the plaintiffs are a group of private citizens who allegedly committed parking violations. They are not consumers, and we find that the holding in Steinberg controls resolution of the issue.
We next address the trial court’s second ruling that plaintiffs’ complaint is an impermissible collateral attack. The court noted that the Chicago Municipal Code (Chicago Municipal Code § 27 — 387(b) (1963)) provided plaintiffs three ways to dispose of the parking tickets: (1) by trial; (2) by official action by a municipal judge; or (3) by payment of the fine and penalty to the clerk of the circuit court of Cook County. The court then reasoned that "if plaintiffs acted in accordance with one of the three options their traffic ticket cases were deemed disposed of by the Court and were, therefore, final judgments.” The court ruled that "plaintiffs’ cases were deemed disposed of when they paid their respective fines, and this disposal was the equivalent of a final judgment.”
A judgment rendered by a court having jurisdiction of the parties and the subject matter is not subject to attack in a collateral action. But before we can apply the doctrine of collateral attack, a final judgment on the merits is required. The record before us is unclear whether final judgments were ever entered by the traffic court in these cases.
A section 2 — 615 motion to dismiss for failure to state a cause of action attacks the legal sufficiency of a complaint. (Kolegas v. Heftel Broadcasting Corp. (1992), 154 Ill. 2d 1, 8.) A motion to dismiss a cause of action because it is barred by a previous judgment is properly brought under section 2 — 619 of the Code of Civil Procedure (Ill. Rev. Stat. 1991, ch. 110, par. 2 — 619). While improper labeling is not always fatal, it will require reversal if the nonmovant is prejudiced by the error. (Premier Electrical Construction Co. v. La Salle National Bank (1983), 115 Ill. App. 3d 638.) We find that the trial court erred as a matter of law in finding that the traffic court entered final judgments in these cases. Plaintiff's were prejudiced by this error. The county was not required to offer proof of final judgments, and plaintiffs were forced to forego presenting affidavits to support their contention that the traffic court did not enter final judgments. We reverse the dismissal of the county under count I and remand for further proceedings.
Affirmed in part and reversed in part and remanded.
JOHNSON, J., concurs.