
795 N.E.2d 808 (2003)
343 Ill. App.3d 49
277 Ill.Dec. 140
Marilyn HANLEY, Plaintiff-Appellant,
v.
The CITY OF CHICAGO, Defendant-Appellee.
No. 1-01-0869.
Appellate Court of Illinois, First District, Fourth Division.
June 30, 2003.
Rehearing Denied July 29, 2003.
As Modified Upon Denial of Rehearing August 7, 2003.
*810 Philip F. Maher & Assoc., Chicago (Philip F. Maher, Janice Schaffick, of counsel), for Appellants.
Mara S. Georges, Corporation Counsel of the City of Chicago (Lawrence Rosenthal, Benna Ruth Solomon, Suzanne M. Loose, of counsel), for Appellees.


*811 MODIFIED UPON DENIAL OF REHEARING

Justice KARNEZIS delivered the opinion of the court:
Marilyn Hanley appeals from an order of the trial court granting summary judgment to defendant, the City of Chicago, in her personal injury action and from the court's denial of her motion to reconsider the court's order. The court found defendant immune from civil liability pursuant to the Local Governmental and Governmental Employees Tort Immunity Act (745 ILCS 10/1-101 et seq. (West 1998)) (the Tort Immunity Act) for injuries plaintiff sustained when she tripped in a pothole and fell. On appeal, plaintiff argues that the court erred in granting summary judgment to defendant because (1) the court erroneously barred plaintiff's expert from testifying at trial and disregarded the expert's affidavit submitted with plaintiff's response to defendant's motion for summary judgment and (2) defendant was not immune from liability. We reverse and remand.

BACKGROUND
On January 8, 1996, plaintiff was injured when she tripped and fell in a pothole within a crosswalk at the intersection of Michigan Avenue and Ontario Street in Chicago. Plaintiff filed a complaint against defendant alleging that defendant's negligence in maintaining the crosswalk and its failure to repair the pothole and warn of the danger it presented caused her injuries. Defendant answered, denying the claims and raising as an affirmative defense that it was immune from liability pursuant to section 3-102 of the Tort Immunity Act because its property was in a reasonably safe condition for its intended purpose when the accident occurred, defendant had no actual or constructive notice that the condition of its property was not reasonably safe, and plaintiff failed to exercise ordinary care in crossing the street. Defendant also argued that plaintiff's own negligence proximately caused her injury and, in the event that defendant was found negligent, any judgment against defendant should be reduced comparatively.
On May 1, 2000, 45 days prior to trial, defendant brought a motion for summary judgment arguing that it was immune from liability (1) pursuant to section 2-201 of the Tort Immunity Act because decisions whether to inspect or repair a street are purely discretionary; (2) pursuant to section 3-102(a) because no evidence was produced during discovery that defendant had actual or constructive notice of the pothole; and (3) pursuant to section 3-104 because it has no liability arising from a failure to warn. In response, plaintiff argued that the cited provisions of the immunity statute do not apply because (1) defendant created the defect when it inadequately repaired the pothole; (2) there is no immunity for repairing a pothole, which is a ministerial rather than a discretionary act; (3) defendant had notice of the pothole; and (4) section 3-104 only refers to traffic control warning devices affecting motor vehicles, not, as here, affecting pedestrians. Plaintiff attached numerous exhibits to her response, including the affidavit and report of Douglas Bynum, Ph.D., P.E.
Dr. Bynum, an engineer, opined that the pothole had been patched at some point but that the repair had not been done "in the appropriate manner" or using appropriate materials. He stated that the patched pothole should have been gouged out completely and larger than the pothole itself before being filled with asphalt. He concluded that the overall depth of the pothole was 2 5/16 inches below grade and that the depth was sufficient to cause most *812 people to lose their balance, especially at night. He also stated that plaintiff crossed the street in a prudent manner and that defendant had notice of the "dangerous and unsafe condition at the scene of the accident." Dr. Bynum was not disclosed as an expert witness prior to trial pursuant to Supreme Court Rule 213 (177 Ill.2d R. 213) and the trial court barred him from testifying at trial.
Defendant filed a reply in support of its motion for summary judgment, moving to strike Dr. Bynum's affidavit and report for introducing new facts, conclusions and opinions in violation of Supreme Court Rule 213. Defendant also argued that the report and affidavit raised new allegations of improper repair that were "never before plead[ed]" and thus barred by the statute of limitations.
Subsequently, the court[1] granted defendant's motion for summary judgment, finding that defendant was immune from liability because repair of the pothole was a discretionary act on defendant's part and there was no evidence that the pothole had been filled in a manner other than correctly prior to plaintiff's fall or that defendant had notice of the defective pothole. Because Dr. Bynum was barred from testifying at trial, the court did not consider Dr. Bynum's affidavit and report in making its determination, noting that only evidence admissible at trial may be considered in ruling on a motion for summary judgment. The court stated that it would not address the issue of whether defendant properly repaired the pothole before plaintiff fell because this issue was not before the court. The court denied plaintiff's motion to reconsider and plaintiff timely filed her notice of appeal.

ANALYSIS
A drastic means of disposing of litigation, a motion for summary judgment is granted only when the pleadings, depositions, and admissions on file, together with any affidavits, construed strictly against the movant and liberally in favor of the opponent of the motion, show that there is no genuine issue as to any material fact and that the moving party is entitled to a judgment as a matter of law. Purtill v. Hess, 111 Ill.2d 229, 240-41, 95 Ill.Dec. 305, 489 N.E.2d 867, 871 (1986). We review the trial court's entry of summary judgment de novo. Axen v. Ockerlund Construction Co., 281 Ill.App.3d 224, 229, 217 Ill.Dec. 24, 666 N.E.2d 693, 696 (1996).

WAIVER OF AFFIRMATIVE DEFENSE
The trial court granted summary judgment to defendant because it found defendant immune from civil liability pursuant to section 2-201 of the Tort Immunity Act, which provides for immunity for discretionary acts. 745 ILCS 10/2-201 (West 1998). Defendant did not raise the section 2-201 discretionary immunity defense in its answer to plaintiff's complaint. Generally, in order to avoid surprise to the opposite party, an affirmative defense must be set out completely in a party's answer to a complaint and failure to do so results in waiver of the defense. 735 ILCS 5/2-613(d) (West 1998); Horwitz v. Bankers Life & Casualty Co., 319 Ill.App.3d 390, 399, 253 Ill.Dec. 468, 745 N.E.2d 591, 598 (2001); Rognant v. Palacios, 224 Ill.App.3d 418, 422, 166 Ill.Dec. 728, 586 N.E.2d 686, 688 (1991). However, courts have held that an affirmative defense may be raised, as defendant did in this case, in a motion for summary judgment even though the defense was not raised in an answer. Horwitz, 319 Ill. *813 App.3d at 399, 253 Ill.Dec. 468, 745 N.E.2d at 598; Holladay v. Boyd, 285 Ill.App.3d 1006, 1011, 221 Ill.Dec. 355, 675 N.E.2d 262, 266 (1996); Salazar v. State Farm Mutual Automobile Insurance Co., 191 Ill.App.3d 871, 876, 138 Ill.Dec. 969, 548 N.E.2d 382, 385 (1989); Strzelczyk v. State Farm Mutual Automobile Insurance Co., 138 Ill.App.3d 346, 349, 93 Ill.Dec. 20, 485 N.E.2d 1230, 1232 (1985). We review the trial court's decision to allow defendant to raise its discretionary immunity defense for the first time in its motion for summary judgment for abuse of discretion. Horwitz, 319 Ill.App.3d at 399, 253 Ill.Dec. 468, 745 N.E.2d at 599.
It appears from the record that plaintiff did not object to defendant's raising this affirmative defense until she filed her motion to reconsider the grant of summary judgment, and then only in the context of her use of Dr. Bynum's affidavit to counter the defense. Accordingly, by her failure to object, plaintiff forfeited consideration of whether defendant waived its section 2-201 affirmative defense. Hill v. Chicago Housing Authority, 233 Ill.App.3d 923, 933, 175 Ill.Dec. 104, 599 N.E.2d 1118, 1124-25 (1992). Moreover, a determination that an affirmative defense has been waived is especially inappropriate where, as here, the party asserting that the defense has been waived had ample time to respond to the defense and, as a result, was not unfairly prejudiced by the failure to raise it in the answer. Horwitz, 319 Ill.App.3d at 399, 253 Ill.Dec. 468, 745 N.E.2d at 598. Although plaintiff may have been surprised by the discretionary immunity defense, she had 45 days prior to trial in which to respond to the motion for summary judgment. In addition, the court granted plaintiff two extensions in which to file her response and ultimately allowed plaintiff to file her response instanter on July 13, 2000. We note that the court also rescheduled the trial date twice at plaintiff's request, from June 14, 2000, to July 20, 2000, to September 13, 2000. Plaintiff had more than ample time in which to respond to the motion and did so. We find that she was, therefore, not prejudiced by defendant's failure to raise its section 2-201 discretionary immunity defense in its answer, defendant did not waive that defense and the court did not abuse its discretion in considering it.

FAIRNESS
In its motion for summary judgment, defendant argued that section 2-201 applies to its actions in deciding to inspect or repair a street and that it is immune from liability for any alleged negligence in making those discretionary determinations. In response, plaintiff argued that repair of the pothole was a ministerial act for which defendant does not have immunity because defendant created the defect by inadequately repairing the pothole, as shown by Dr. Bynum's affidavit. The court found defendant immune from liability, disregarding Dr. Bynum's affidavit because Dr. Bynum was previously barred from testifying.
The basis for summary judgment is that the plaintiff is unable to procure an expert, not that she is in technical violation of a discovery schedule. Higgens v. House, 288 Ill.App.3d 543, 550, 223 Ill.Dec. 886, 680 N.E.2d 1089, 1094 (1997) (Cook, J., dissenting). Although the imposition of sanctions for a party's failure to comply with discovery rules and orders is within the discretion of the trial judge, such sanctions must be just and commensurate with the seriousness of the violation. Ralston v. Casanova, 129 Ill.App.3d 1050, 1056, 85 Ill.Dec. 76, 473 N.E.2d 444, 449 (1984); Kubian v. Labinsky, 178 Ill.App.3d 191, 196-97, 127 Ill.Dec. 404, 533 N.E.2d 22, 25 (1988). Here, the court barred Dr. Bynum *814 from testifying at trial because plaintiff did not disclose him as an expert prior to close of discovery. The court's subsequent disregard of Dr. Bynum's affidavit on the basis of the earlier order resulted in the court's finding that there was no evidence that the repair had not been correctly done, thereby defeating any chance plaintiff had to rebut defendant's affirmative defense. This was clearly an unjust result.
The purpose of sanctions is to accomplish the goal of discovery (Harris v. Harris, 196 Ill.App.3d 815, 820, 144 Ill.Dec. 113, 555 N.E.2d 10, 14 (1990)) but discovery on the issue of adequate repair was not called for here until after the close of discovery. Plaintiff did not ignore discovery deadlines or refuse to comply with discovery requests. Rather, she did not explore the issue or declare an expert during discovery because adequacy of repair was not yet an issue in the case; defendant did not raise the affirmative defense to which this evidence was germane until after the close of discovery. Revision of a discovery schedule order is at the discretion of the circuit court and generally appropriate to accommodate changes in the circumstances of the case. Smock v. Hale 197 Ill.App.3d 732, 740, 144 Ill.Dec. 177, 555 N.E.2d 74, 79 (1990). Since the court allowed defendant to raise its affirmative defense after the close of discovery, it should have allowed plaintiff to rebut this affirmative defense with evidence presented after close of discovery. Accordingly, on remand, discovery is to be reopened in order to allow plaintiff to disclose additional expert witnesses in this action. See Cometo v. Foster McGaw Hospital, 167 Ill.App.3d 1023, 1030, 118 Ill.Dec. 662, 522 N.E.2d 117, 121 (1988); Smock v. Hale 197 Ill.App.3d 732, 144 Ill.Dec. 177, 555 N.E.2d 74.

IMMUNITY PURSUANT TO SECTION 2-201
Section 2-201 provides that "[e]xcept as otherwise provided by Statute, a public employee serving in a position involving the determination of policy or the exercise of discretion is not liable for an injury resulting from his act or omission in determining policy when acting in the exercise of such discretion even though abused." 745 ILCS 10/2-201 (West 1998). Any immunity for policy determinations and discretionary acts or omissions by its employees extends to defendant. In re Chicago Flood Litigation, 176 Ill.2d 179, 193-94, 223 Ill.Dec. 532, 680 N.E.2d 265, 272 (1997). Section 2-201 immunizes liability for both negligence and willful and wanton misconduct. Spangenberg v. Verner, 321 Ill.App.3d 429, 433, 254 Ill.Dec. 319, 747 N.E.2d 359, 362 (2001), citing In re Chicago Flood Litigation, 176 Ill.2d at 196, 223 Ill.Dec. 532, 680 N.E.2d at 273.
Our supreme court has held that "`[a] municipal corporation acts judicially or exercises discretion when it selects and adopts a plan in the making of public improvements, but as soon as it begins to carry out that plan it acts ministerially and is bound to see that the work is done in a reasonably safe and skillful manner.'" Greene v. City of Chicago, 73 Ill.2d 100, 108, 22 Ill.Dec. 507, 382 N.E.2d 1205, 1209 (1978), quoting Johnston v. City of East Moline, 405 Ill. 460, 466, 91 N.E.2d 401, 404 (1950). A local public entity is not immune from liability for the performance of ministerial tasks. Morrissey v. City of Chicago, 334 Ill.App.3d 251, 257, 267 Ill.Dec. 587, 777 N.E.2d 390, 394 (2002). However, as this court noted:
"Every failure to maintain property could be described as an exercise of discretion under the municipal defendants expansive approach to governmental immunity. The legislature could not have intended such a result; otherwise, *815 it would not have codified the common law duty to maintain property under section 3-102 of the Act. The Act must be strictly construed against the public entity involved." Anderson v. Alberto-Culver USA, Inc., 317 Ill.App.3d 1104, 1117, 251 Ill.Dec. 533, 740 N.E.2d 819, 829 (2000).
Pursuant to section 3-102(a) of the Tort Immunity Act, defendant "has the duty to exercise ordinary care to maintain its property in a reasonably safe condition." 745 ILCS 10/3-102(a) (West 1998). To maintain property is to keep it "`"in a state of repair [or] efficiency,"`" and is considered a ministerial act while to improve property falls under the discretionary decision of the government entity. Morrissey, 334 Ill.App.3d at 256, 267 Ill.Dec. 587, 777 N.E.2d at 394, quoting Anderson, 317 Ill.App.3d at 1112, 251 Ill.Dec. 533, 740 N.E.2d at 826, quoting Webster's Third New International Dictionary 1362 (1993). A repair is generally considered a ministerial act for which a defendant may be liable if negligently performed. Morrissey, 334 Ill.App.3d at 257, 267 Ill.Dec. 587, 777 N.E.2d at 394; In re Chicago Flood Litigation, 176 Ill.2d at 194, 223 Ill.Dec. 532, 680 N.E.2d at 272-73. Therefore, the actual repair here, the filling of the pothole, could be considered a ministerial task, for which defendant has no immunity if negligently performed. Morrissey, 334 Ill.App.3d at 257, 267 Ill.Dec. 587, 777 N.E.2d at 394; In re Chicago Flood Litigation, 176 Ill.2d at 194, 223 Ill.Dec. 532, 680 N.E.2d at 272-73. However, whether acts are discretionary or ministerial must be determined "`on a case-by-case basis.'" Morrissey, 334 Ill.App.3d at 257, 267 Ill.Dec. 587, 777 N.E.2d at 394, quoting Snyder v. Curran Township, 167 Ill.2d 466, 474, 212 Ill.Dec. 643, 657 N.E.2d 988, 993 (1995). Depending on the circumstances of a particular case, an act which might be considered a repair can be a discretionary matter. Wrobel v. City of Chicago, 318 Ill.App.3d 390, 396, 252 Ill.Dec. 151, 742 N.E.2d 401, 407 (2000), citing In re Chicago Flood Litigation, 176 Ill.2d at 195, 223 Ill.Dec. 532, 680 N.E.2d at 273.
In Wrobel, 318 Ill.App.3d 390, 252 Ill.Dec. 151, 742 N.E.2d 401, this same defendant moved for summary judgment in the plaintiffs' personal injury action, asserting discretionary immunity pursuant to section 2-201 for its alleged failure to maintain the public roadway in reasonably safe condition. The plaintiffs were injured in a collision when a third party lost control of his car after striking a pothole in the roadway and veered into oncoming traffic. The court held that, "under the facts and circumstances" of that case, the preparation and filling of potholes were discretionary acts and policy determinations. Wrobel, 318 Ill.App.3d at 395-96, 252 Ill.Dec. 151, 742 N.E.2d at 406-07. The evidence showed that the manner in which the asphalt mixture was applied to potholes differed among the various asphalt work crews, that "[i]n particular part, the crews do not follow any uniform approach of handling asphalt debris and water within a pothole to be repaired." Wrobel, 318 Ill.App.3d at 392, 252 Ill.Dec. 151, 742 N.E.2d at 404. In addition, a supervisor's testimony showed that asphalt workers used discretion and personal judgment in determining how to fill potholes. Although the supervisor prescribed a method for repairs and the workers under his supervision had no discretion to decide whether to follow that method, the amount of asphalt and moisture actually removed from a pothole and determined to be sufficient was left to the personal judgment of the workers. Encompassed within that judgment are policy considerations of time and resource allocation among the various potholes scheduled for repair on a particular work day.
*816 In Morrissey, defendant similarly moved for summary judgment in a wrongful death action, asserting discretionary immunity pursuant to section 2-201 for its alleged failure to maintain the public roadway in reasonably safe condition. The plaintiffs' deceaseds were killed in a collision when one of them allegedly lost control of her car due to the poor condition of the roadway and the defendant's failure to warn of or to repair potholes. The court noted that there was no evidence presented which indicated that anyone had made any decision at all regarding the pothole at issue. The court, therefore, denied summary judgment, finding that questions of fact existed as to whether the case involved decisions which could be characterized as discretionary versus ministerial. Where questions of fact exist regarding the distinction, summary judgment should not be granted. Morrissey, 334 Ill.App.3d at 255, 267 Ill.Dec. 587, 777 N.E.2d at 393.
As in Morrissey, there is no evidence in the record regarding the filling of the pothole at issue here. Although the record does contain evidence that a repair crew has discretion regarding whether a particular repair can be done or should be done on a particular day, it contains no evidence regarding whether the actual repair of a pothole is discretionary, let alone any evidence regarding the filling of the pothole into which plaintiff stepped. If repairing a pothole is done pursuant to a set procedure with no room for discretionary decisions, it is a ministerial act. See In re Chicago Flood Litigation, 176 Ill.2d at 196-97, 223 Ill.Dec. 532, 680 N.E.2d at 273. Unlike in Wrobel, there is no evidence here regarding how a repair is actually performed. There is no evidence regarding whether a plan exists for pothole repair such that workers fill potholes pursuant to a set method in a prescribed manner without any exercise of discretion or whether, as in Wrobel, they use their own judgment in performing the repair. Determinations regarding whether an act or omission is discretionary versus ministerial are fact specific. Wrobel, 318 Ill.App.3d at 395-96, 252 Ill.Dec. 151, 742 N.E.2d at 406-07. There are no such facts available here from which to make that determination and summary judgment was, therefore, improper. Morrissey, 334 Ill.App.3d at 255, 267 Ill.Dec. 587, 777 N.E.2d at 393.
Moreover, a question of fact exists regarding whether the repair was adequately performed. A municipality has a duty to reasonably maintain its crosswalks for the use of pedestrians (Wojdyla v. City of Park Ridge, 209 Ill.App.3d 290, 293, 154 Ill.Dec. 144, 568 N.E.2d 144, 145 (1991)), and the record shows that defendant maintained the crosswalk at issue here by repairing the pothole. Kenneth Rigan, chief engineer for defendant's bureau of streets maintenance division at the time of plaintiff's accident, acknowledged that, based on photographs taken two days after the accident, "some crewman at some point made the determination to fix or patch the pothole." Rigan opined that the pothole had been filled with a cold mix and that the patch job appeared to be properly done. This evidence that the pothole exhibited signs of repair made prior to plaintiff's accident is evidence that, at some point in time, defendant had notice that the pothole was there and decided to repair it.
Once defendant embarked on the repair, it had a duty to perform the repair in a "`reasonably safe and skillful manner'" (Greene, 73 Ill.2d at 108, 22 Ill.Dec. 507, 382 N.E.2d at 1209, quoting Johnston, 405 Ill. at 466, 91 N.E.2d at 404), "with reasonable care and in a nonnegligent manner" (Snyder, 167 Ill.2d at 474-75, 212 Ill.Dec. 643, 657 N.E.2d at 993). If defendant creates a hazardous condition, it must respond in damages if *817 someone is injured as a result. Washington v. City of Chicago, 188 Ill.2d 235, 240, 242 Ill.Dec. 75, 720 N.E.2d 1030, 1033 (1999), citing Baran v. City of Chicago Heights, 43 Ill.2d 177, 181, 251 N.E.2d 227, 229 (1969). Dr. Bynum's opinion is that the repair was inadequate and created a hazardous condition while Rigan's testimony is that the repair appeared to be properly done. The determination of whether the repair was adequate is material to plaintiff's claim because defendant is liable for the negligent performance of a ministerial repair task. If the repair was inadequate, defendant's section 2-201 affirmative defense fails. Given the conflicting evidence, we find that a genuine issue of material fact exists as to whether the repair was adequately performed and that the court erred in granting summary judgment to defendant.

DR. BYNUM'S AFFIDAVIT
Since discovery will be reopened to permit plaintiff to disclose Dr. Bynum as her expert, an analysis of the court's determination that it could not consider Dr. Bynum's affidavit in support of plaintiff's response to defendant's motion for summary judgment because Dr. Bynum was barred from testifying at trial is superfluous. Suffice it to say that Supreme Court Rule 191, which sets forth the requirements for affidavits used in support of and in opposition to motions for summary judgment, does not state the requirement that the affiant must be sworn as a witness. Rather, the rule states that the affidavit must "affirmatively show that the affiant, if sworn as a witness, can testify competently" to the contents of the affidavit. (Emphasis added.) 134 Ill.2d R. 191(a). "[A] literal reading of Rule 191 requires that the affiant could testify competently, not that affiant will testify. If the supreme court had intended that Rule 191 affiants be disclosed as expert trial witnesses, it could have specifically provided for such." (Emphasis in original.) Brooks v. Illinois Masonic Hospital & Medical Center, 240 Ill.App.3d 521, 524-25, 181 Ill.Dec. 410, 608 N.E.2d 483, 486 (1992) (court erred in striking undisclosed expert's affidavit presented in opposition to motion for summary judgment even though plaintiff indicated that expert would not be called at trial). See also Andrews v. Northwestern Memorial Hospital, 184 Ill.App.3d 486, 132 Ill.Dec. 707, 540 N.E.2d 447 (1989) (trial court erred in striking undisclosed expert's affidavit presented in opposition to motion for summary judgment solely because prior order limited parties to one expert; plaintiff should have been allowed opportunity to modify order to enable him to name additional expert).
For the reasons stated above, we reverse the decision of the trial court and remand for further proceedings.
Reversed and remanded.
HARTMAN and GREIMAN, JJ., concur.
NOTES
[1]  A different judge presided over the hearing on defendant's motion for summary judgment than presided over the previous motion hearings.
