When answering a preceding pleading, the following defenses shall be set forth affirmatively: compromise, accord and satisfaction, arbitration and award, assumption of risk, negligence, discharge in bankruptcy, duress, estoppel, failure of consideration, fraud, illegality, lack of diligence, authorization, payment, release, res judicata, prescription, limitation of actions, waiver and any other matter constituting an avoidance or affirmative defense. When a party has mistakenly designated a defense as a counterclaim, or a counterclaim as a defense, the court, if justice so requires and on the terms it deems appropriate, shall treat the pleading as if there had been a proper designation.