
768 N.E.2d 54 (2002)
329 Ill. App.3d 69
263 Ill.Dec. 294
LEASE PARTNERS CORPORATION, Plaintiff-Appellant,
v.
R & J PHARMACIES INC., Wells Yeager Best Co. Inc. and Steven Klink, individually, Steve Randall, d/b/a Randall Pharmacy and Steve Randall, individually, Defendants-Appellees.
Nos. 1-00-2664, 1-00-2667, 1-00-2668.
Appellate Court of Illinois, First District, Second Division.
March 26, 2002.
Bruce N. Crawford, Askounis & Borst, P.C, Chicago, for Appellants.
Jeffrey D. Corso, William M. Brennan, Rock, Fusco & Garvey, Ltd., Chicago, for Appellees.
*55 Justice GORDON delivered the opinion of the court:

NATURE OF THE CASE
Lease Partners Corporation (plaintiff or Lease Partners) appeals from a decision of the circuit court of Cook County dismissing its breach of contract complaint for failure to pay Illinois state corporate franchise tax, pursuant to section 15.85 of the Illinois Business Corporations Act (section 15.85) (805 ILCS 5/15.85 (West 2000)), and for failure to file security for costs, pursuant to section 5-103 of the Illinois Civil Practice Code (section 5-103) (735 ILCS 5/5-103 (West 2000)). Lease Partners contends that the court misconstrued section 15.85 as requiring dismissal of the action, rather than staying the proceedings with directions that it pay the arrearage. Lease Partners also contends that the court exceeded its authority by sua sponte raising the issue of security for costs under section 5-103, and summarily dismissing its complaint. Lease Partners further contends that, on its face, section 5-103 violates the equal protection clause of the United States and Illinois constitutions and that the trial court's order denied it due process of law. For the reasons discussed below, we reverse the circuit court's dismissal of this action under both sections 15.85 and 5-103. Because our analysis of the proper application of each of these sections disposes of the instant appeal and grants the relief sought by Lease Partners, we do not reach Lease Partners' alternative constitutional challenges.

BACKGROUND
The facts, as outlined in plaintiff's brief to this court, were adopted unchallenged by defendants. Lease Partners is a California corporation with an Illinois office responsible for administering the contracts at issue. Defendants are R & J Pharmacies, Inc. (R & J Pharmacies), Steve Randall and Randall Pharmacies (Randall Pharmacies), and Wells Yeager Best Co., Inc. and Steven Klink (Wells Yeager). During 1993 and 1994, Recomm International Display Limited Corporation (Recomm), a non-party to this suit, sold equipment ("Advisory Boards"-which were designed to display advertising) to Lease Partners. At the time of the sales, Lease Partners executed leases for the boards with defendants, and Recomm delivered this equipment directly to defendants. Recomm simultaneously entered into separate agreements with defendants to rent advertising space on the boards.
In 1995, Recomm ceased to meet its obligations to defendants, who in turn ceased to make lease payments to Lease Partners. Ultimately, Recomm filed for bankruptcy and in 1998 the bankruptcy court entered an order modifying the leases between defendants and Lease Partners to reflect a total amount due. Each defendant failed to make payments under this order and Lease Partners brought suit against the defendants individually in the circuit court of Cook County.
On June 27, 2000, the circuit court dismissed Lease Partners' suit against one defendant, R & J Pharmacies, without prejudice, making the following conclusions of law:
"2) As a result of its failure to pay its current Illinois state corporate franchise taxes [Lease Partners] may not maintain any civil action in the state of Illinois, pursuant to 805 ILCS 5/15.85: and,
3) Pursuant to 735 ILCS 5/5-103, this action having been commenced without previously filing or causing to be filed a security for costs, the action should be *56 dismissed." [1]
The court indicated that the ruling was based only on the above mentioned grounds and not upon R & J Pharmacies' previously filed "motion to dismiss" which contested personal jurisdiction. On July 10, 2000, the court dismissed plaintiff's complaint against Randall Pharmacy with prejudice, reaching the same conclusions of law quoted above. On July 12, 2000, the court dismissed plaintiff's complaint against the third defendant, Wells Yeager, in the same manner. No defendant made a motion to dismiss for failure to file security for costs.
Plaintiff appealed each of the dismissals to this court and moved to consolidate the cases based on similarity in issues presented. We granted plaintiff's motion.

ANALYSIS
Plaintiff contends that the trial court erred in dismissing its action against all defendants because the court misinterpreted section 15.85. Plaintiff argues that our courts have interpreted this statute as affording parties who are delinquent in paying their corporate franchise taxes an opportunity to pay those taxes and avoid dismissal. Defendants counter that the language of the statute contemplates a direct dismissal based on a tax delinquency and that the trial court did not err in ordering such a dismissal. We agree with plaintiff that the statute contemplates that courts should stay proceedings involving delinquent plaintiffs until such time as the franchise taxes are paid and does not contemplate a dismissal on this ground.
Section 15.85 states that "[n]o corporation required to pay a franchise tax, license fee or penalty under this Act shall maintain any civil action until all such franchise taxes, license fees and penalties have been paid in full." 805 ILCS 5/15.85 (West 2000). As this court has held, the word "maintain" means only "continue," and is not meant to bar a delinquent corporation from proceeding with an action. Amman Food & Liquor, Inc. v. Heritage Insurance, Co., 65 Ill.App.3d 140,147, 22 Ill.Dec. 242, 382 N.E.2d 562, 567 (1978) (appellate court reversed trial court's dismissal of corporation's action to recover under insurance policy because corporation was delinquent in paying franchise tax). Building on the foundation established in Amman, this court more recently noted that:
"[Section 15.85] should not be seen as an absolute bar to the prosecution of claims brought by corporations which are delinquent in the payment of their franchise tax. Nor should the section be deemed to extinguish those claims * * *. Rather, it serves merely as a temporary impediment to the completion of the action." (Emphasis added.) Merchants Environmental Industries, Inc. v. Montgomery Ward and Co., Inc., 252 Ill.App.3d 906, 911-12, 192 Ill.Dec. 534, 625 N.E.2d 689, 693 (1993).
We concluded, "it has long been recognized that a `suit could not be dismissed for failure to pay franchise taxes[,][i]t could only be continued until those taxes were paid.'" Merchants Environmental, 252 Ill.App.3d at 910, 192 Ill.Dec. 534, 625 N.E.2d at 692, quoting Sheffield Steel & Iron Co. v. Jos Joseph & Brothers Co., 238 Ill. App. 45, 49 (1925). Accord, Kaybill Corp. Inc. v. Cherne, 24 Ill.App.3d 309, 314, 320 N.E.2d 598, 603 (1974); Jorgensen *57 sen v. Baker, 21 Ill.App.2d 196, 203, 157 N.E.2d 773, 777 (1959). Thus, we held that the trial court erred in dismissing with prejudice counterclaims filed by a delinquent defendant. Based upon this precedent, we conclude that the trial court erred in summarily dismissing the instant suit when the proper remedy is an order staying proceedings until the delinquency is rectified.
Defendants intimate that because the complaints were not dismissed simultaneously plaintiff was, in fact, afforded an opportunity to pay the taxes and avoid dismissal. We acknowledge that the record reflects that in its initial order dismissing plaintiff's complaint against R & J Pharmacies, the trial court noted that the dismissal was without prejudice and was based solely on plaintiff's failure to pay its taxes and to forward security for costs. The court further noted that the suit could be reinstated upon payment. The court issued this order on June 27, 2000, and did not issue its next order, dismissing the second suit with prejudice, until July 10, 2000. Defendants' suggestion that plaintiff had the equivalent of an opportunity to continue its suit is, however, of no moment. First, such an opportunity was not afforded plaintiff in its case against R & J Pharmacies, which the record demonstrates was dismissed without prior notice of the trial court's intentions. Furthermore, as illustrated above, our courts have held that section 15.85 is not grounds for dismissal in any event and thus, regardless of any de facto opportunity to pay that plaintiff may have been afforded, the trial court pursued an improper remedy.
Plaintiff also argues that this case is controlled by our supreme court's decision in Textile Fabrics Corporation v. Roundtree, 39 Ill.2d 122, 233 N.E.2d 376 (1968). Because that case decided the constitutionality of a statute not at issue here, we fail to see its relevance. In Textile Fabrics, the court held that section 13.70 of the Business Corporations Act, which states that "no foreign corporation transacting business in this State without a certificate of authority is permitted to maintain a civil action in any court of this State," (805 ILCS 5/13.70 (West 2000)), violates the commerce clause of the United States constitution when applied to foreign corporations suing on transactions involving interstate commerce. Textile Fabrics, 39 Ill.2d at 124-25, 233 N.E.2d at 377-78. However, the trial court in the instant case explicitly noted that plaintiff's failure to pay franchise taxes warranted dismissal under section 15.80 of the Business Corporations Act, which imposes franchise taxes on both domestic and foreign corporations, and it is therefore neither implicated in, nor controlled by, the decision in Textile Fabrics, which applies to certificates of authority required only of foreign corporations.
Plaintiff next contends that the trial court erred in raising, sua sponte, the issue of its failure to file security for costs and then summarily dismissing the complaint without allowing plaintiff an opportunity to so file. We agree. The Illinois Civil Practice Act contemplates that foreign plaintiffs who choose to avail themselves of the Illinois courts must file security for costs with the court. 735 ILCS 5/5-101 (West 2000). The statute indicates that:
"in all civil actions, where the plaintiff * * * is not a resident of this State, the plaintiff * * * shall, before he or she institutes such an action, file, or cause to be field, with the clerk of the court in which the action is to be commenced, security for costs." 735 ILCS 5/5-101 (West 2000).
Our courts have held that this security may take the form of a surety bond or a personal undertaking, at the court's discretion, *58 but a court may not require litigants to deposit personal funds, as to do so would unduly restrict nonresident's access to our courts. Bullard v. Bullard, 66 Ill. App.3d 132, 137, 22 Ill.Dec. 876, 383 N.E.2d 684, 688 (1978). Should a nonresident plaintiff fail to file such security, the statute provides that
"the court, on motion, shall dismiss the same, and the attorney of the plaintiff shall pay all costs accruing thereon, unless the security for costs is filed within such time as is allowed by the court, and when so filed shall relate back to the commencement of the action." 735 ILCS 5/5-103 (West 2000).
We note that little has been published on section 5-103 in recent years and we must turn to longstanding cases interpreting the statute for guidance in our analysis. Upon conducting such a review, we see that courts generally disfavor dismissal of actions based on failure to file security for costs, being dilatory in nature, and have consistently held that only slight evidence is sufficient to overcome the prima facie case of the party making the motion. Twining v. Martin, 65 Ill. 157, 1872 WL 8388 (1872); Adams v. Miller, 12 Ill. 27, (1850). Recognizing that actions under the statute are disfavored, our courts have further circumscribed the statute's applicability and effect. First, courts have held that dismissal is improper where the plaintiff files a bond without leave of court, (Baker v. Palmer, 83 Ill. 568 (1876)), although the statute appears to require leave. Our courts have also concluded that the statute is not jurisdictional and does not affect the validity of, or have any force after, judgment. Plaff v. Pacific Exp. Co., 251 Ill. 243, 95 N.E. 1089 (1911). Moreover, a century of caselaw has held that the right to dismissal for plaintiff's failure to file security for costs attaches to the defendant, is in the nature of a plea in abatement, and will be waived if not raised "at the earliest time possible" (Gregory v. Rickey, 307 Ill. 219, 138 N.E. 669 (1923)), certainly, before an answer has been filed. Trustees v. Walters, 12 Ill. 154 (1850). Notwithstanding that the statute indicates that "the right to require security for costs shall not be waived by any proceeding in the action" (735 ILCS 5/5-103 (West 2000)), our courts and commentators have consistently concluded that dismissal for failure to provide security for costs will be waived if untimely raised. Adams v. Miller, 12 Ill. 27, (1850); Papineau v. Belgarde, 81 Ill. 61, 1876 WL 9914 (1876); Grutza v. Original Quartz Hill Gold Mining Co., 178 Ill. App. 274 (1913); Nichols, Illinois Civil Practice § 7:30, at 226-27 (2001).
The cases discussed above and the statute itself clearly contemplate that the defendant make a motion to dismiss if a plaintiff fails to file security for costs. In the present case, defendants made no such motion and the case was dismissed upon the trial court's order, which raised the issue sua sponte in conjunction with the summary dismissal. Thus, we must decide whether the trial court's actions were proper.
In so deciding, we look to an analogous area of law, statutes of limitations, for guidance. Like security for costs, the primary benefactor of statutes of limitations are defendants (Geneva Const. Co. v. Martin Transfer & Storage Co., 4 Ill.2d 273, 122 N.E.2d 540 (1954)) who must both plead and prove the issue as an affirmative defense. Greene v. Helis, 252 Ill.App.3d 957, 192 Ill.Dec. 202, 625 N.E.2d 162 (1993); 735 ILCS 2-619 (West 2000). Generally, statutes of limitations which apply to common law claims are also considered procedural, not jurisdictional, and affect only the remedy available, not the substantive rights of parties. Mackereth *59 v. G.D. Searle and Co., 285 Ill.App.3d 1070, 221 Ill.Dec. 143, 674 N.E.2d 936 (1996). As a result, if defendants do not raise the statute of limitations within the time for pleading, the issue is waived and will not be considered by the trial or appellate courts. People ex rel. Foreman v. Village of Round Lake Park, 171 Ill.App.3d 443, 121 Ill.Dec. 561, 525 N.E.2d 868 (1988). Because the issue must be raised or waived, "trial courts are not allowed to decide * * * statute of limitations issue[s] sua sponte without any input from either party." People v. Whitford, 314 Ill.App.3d 335, 342, 247 Ill.Dec. 594, 732 N.E.2d 649, 656 (2000); Adams v. Inman, 892 S.W.2d 651, 653 (Mo.Ct.App. 1994) (trial court erred in sua sponte dismissing plaintiff's claim based on the running of the statute of limitations, because the issue is an affirmative defense which must be raised by a party). Accord, Reddell v. Johnson, 942 P.2d 200, 202-03 (Okla.1997); Estabrook v. Baden, 284 Mont. 419, 943 P.2d 1334, 1336 (1997); Feldman v. Gogos, 628 A.2d 103, 105 (D.C.1993).
We find this reasoning equally apposite to the issue of security for costs. Like statutes of limitations, the security for costs requirement is generally for the benefit of the defendant, securing potential costs paid by the defendant during the proceedings. Furthermore, the requirement is procedural and not jurisdictional and our courts have consistently held that failure by the defendant to raise the requirement prior to answer forfeits the defendant's right to pursue dismissal on this ground. We therefore conclude that it would be inconsistent to permit trial courts to raise the issue sua sponte as grounds for summary dismissal. To do so would put the trial court in the role of an advocate for a party, rather than taking the case as the parties have presented it (In re Marriage of Drewitch, 263 Ill.App.3d 1088, 1093, 201 Ill.Dec. 620, 636 N.E.2d 1052, 1057 (1994)). It would also relieve defendants of the minimal burden demanded in pursuing this generally disfavored remedy.
Regardless of the issue of waivability, however, we find that the trial court's actions in this case were, at the very least, prematurely preemptive. To avoid the disfavored remedy of dismissal and to comport with a general sense of fairness, our courts have held that when defendants make a motion under section 5-103, the trial court should afford plaintiffs an opportunity to file security for costs before ordering a dismissal. Grutza v. Original Quartz Hill Gold Mining Co., 178 Ill.App. 274; Lee v. Waller, 13 Ill.App. 403, 1883 WL 10515 (1884). These holdings are consistent with language in the section itself which prohibits dismissal if security for costs "is filed within such time as is allowed by the court, and when so filed shall relate back to the commencement of the action." 735 ILCS 5/5-103 (West 2000). The statute thus contemplates that plaintiffs will have an opportunity to remedy their failure to file security for costs prior to being dismissed from court. This is analogous to the previously discussed franchise tax statute, under which plaintiffs are given an opportunity to remedy their debt before being subject to dismissal. As the instant case highlights, when the trial court raises the issue sua sponte in an order of dismissal, plaintiffs are denied any opportunity to remedy the defect, contradicting caselaw and the spirit of the statute. We thus conclude that the trial court's order dismissing plaintiff's complaint without providing an opportunity to file security for costs was error.

CONCLUSION
In conclusion, we find that the trial court erred in dismissing plaintiff's suit for failure to pay its current franchise tax when the appropriate remedy was to stay *60 the proceedings until the delinquency was remedied. We also find that the trial court erred in sua sponte raising plaintiff's failure to file security for costs and dismissing the case without providing an oppurtunity for plaintiff to so file. We thus reverse the trial court's order of dismissal and remand for proceedings not inconsistent with this opinion.
Reversed and remanded.
BURKE, P.J. and McBRIDE, J., concur.
NOTES
[1]  The trial court added to its "Conclusions of Law" that "as a result of the termination of its license to do business in Illinois, [Lease Partners] can no longer maintain a principle office in the [S]tate of Illinois." Plaintiff does not allege, and we fail to see, any connection between this conclusion and the court's disposition of the instant case and thus do not address plaintiff's argument that this is an incorrect statement of Illinois law.
