
132 Ill. App.2d 387 (1971)
270 N.E.2d 515
DAVID DORIN, Plaintiff-Appellee,
v.
OCCIDENTAL LIFE INSURANCE COMPANY OF CALIFORNIA, Defendant-Appellant.
No. 53418.
Illinois Appellate Court  First District.
April 5, 1971.
*388 Peterson, Lowry, Rall, Barber & Ross, of Chicago, (J. Robert Geiman, Peter M. Sfikas, and Sheribel F. Rothenberg, of counsel,) for appellant.
Arnstein, Gluck, Weitzenfeld & Minow, of Chicago, (Harvey J. Barnett, of counsel,) for appellee.
Reversed and remanded.
*389 Mr. JUSTICE SCHWARTZ delivered the opinion of the court:
Plaintiff filed suit for the recovery of commissions allegedly due him pursuant to a brokerage contract with defendant. Defendant's motion to dismiss the complaint was denied and in due course issue was joined on the plaintiff's complaint, defendant's answer and affirmative defense and plaintiff's reply thereto. The case came on for trial and at the conclusion of defendant's opening statement the court entered judgment for plaintiff on the pleadings. The defendant has appealed, contending the court erred in denying the motion to dismiss the complaint or in the alternative that it was error for the court to enter judgment for the plaintiff without allowing defendant an opportunity to submit evidence on the matters set forth in the answer and affirmative defense. The facts follow.
On December 3, 1962, the plaintiff, acting in his capacity as soliciting agent for defendant, submitted the application of one Milton Silverstein for a life insurance policy in the sum of $50,000. The application, signed by both Silverstein and the plaintiff, contained the following questions and answers:
"a. Has any company declined to issue or reinstate or renew, rated or modified, postponed or cancelled, any life or accident and sickness Insurance on your life?
No.
b. Will Insurance in any company be discontinued if the Insurance applied for is issued?
c. Is any application for Insurance on your life pending in any other company?
No."
Defendant alleges that plaintiff made the foregoing answers knowing that an application by Silverstein for life insurance was then pending with the Equitable Life Assurance Society and that prior to the issuance of defendant's policy, plaintiff knew that Equitable had refused to insure Silverstein on the ground of ill health. Notwithstanding that knowledge the plaintiff did not disclose that information to the defendant.
On December 22, 1962, defendant issued a life insurance policy for $50,000 as applied for by Silverstein. On June 30, 1963, Silverstein died and an investigation by defendant revealed the false statements contained in the application. A claim on the Silverstein policy was settled by defendant for $27,000. Defendant then made demand on plaintiff for a refund of $2270.80, the amount of the commission paid to plaintiff on that policy. Defendant based its right to a refund of commission on the brokerage contract, which provided in pertinent part as follows:

*390 "1. Commissions shall be payable hereunder only in accordance with the rules and regulations of the Company.
* * * *
4. If the Company shall return the premiums on a policy for any cause, you shall repay to the Company on demand, the amount of commissions received on the premiums so returned."
Rule 8 of the Agent's Manual of Instructions, incorporated by reference in the contract, provided:
"8. The agent, upon demand, shall pay the Company any commission or other compensation paid to or retained by the agent, to which he is not entitled."
Upon plaintiff's refusal to repay the commission on the Silverstein policy, the defendant deducted the amount thereof from other commissions due plaintiff on other policies he had procured. Plaintiff then filed this suit.
 1, 2 Defendant first contends that the trial court erred in denying its motion to dismiss the complaint for failure to state a claim upon which relief can be granted. The motion was based on the terms of the brokerage contract, which provided that if the company returned the premiums on a policy for any cause, the agent must repay on demand the amount of commission received on the premiums so returned, as hereinbefore set forth. Defendant argues that at most only $3244 was paid by Silverstein in premiums on the policy and since the beneficiary's claim for $50,000 was compromised for $27,000, the return of premiums must be considered to have been part of the settlement. In settling the claim on the policy, defendant could well have taken into consideration the uncertainty of litigation and other factors entering into the satisfaction of a death claim by an insurance company. There is no affirmative showing that the amount paid in settlement was in any way related to a return of premiums and such a construction of the naked act of settlement is not warranted. Defenses which are in their nature factual rather than legal do not constitute grounds for a motion to dismiss, but must be set forth in an answer to the plaintiff's pleading. (Vrooman v. Hawbaker, 387 Ill. 428, 56 N.E.2d 623.) The trial court properly denied defendant's motion to dismiss.
Defendant contends that the trial court erred in concluding that the affirmative defense was insufficient in law and that plaintiff was not entitled to judgment on the pleadings. The affirmative defense interposed by defendant alleges, in substance, that plaintiff's misrepresentations on the Silverstein application constituted a breach of duty which deprived the agent of any right to compensation arising out of the subject matter of his agency and that plaintiff therefore has received all he is entitled to receive as compensation from his principal.
*391  3-6 The relation of principal and agent is one of trust and confidence. (People v. Riggins, 8 Ill.2d 78, 132 N.E.2d 519; Lerk v. McCabe, 349 Ill. 348, 182 N.E. 388.) An agent in the exercise of good faith is bound to keep his principal informed on all matters which may come to his attention pertaining to the subject matter of the agency. (Shinpaugh v. Midwest Life Insurance Co., 32 Ill. App.2d 207, 177 N.E.2d 426.) It is also well settled that an agent is entitled to compensation only on a due and faithful performance of all his duties to his principal. (Craven v. Craven, 407 Ill. 252, 95 N.E.2d 489; Steinmetz v. Kern, 375 Ill. 616, 32 N.E.2d 151.) A principal is entitled to refuse to pay the salary due an employee in reduction of any right the principal has arising out of the agent's violation of duties. (Restatement of the Law 2nd, Agency § 399, Comment (g) (1957).) Guided by these rules it is clear that defendant has pleaded facts which show a breach of duty on the part of plaintiff which would bar any right to a commission on the Silverstein policy. It is plaintiff's contention, however, that defendant's allegations do not properly set forth an affirmative defense to a suit for commissions on other unrelated policies.
 7, 8 The Civil Practice Act is to be liberally construed to the end that controversies may be speedily and finally determined according to the substantive rights of the parties. (Ill. Rev. Stat. (1969), ch. 110, par. 4.) While defendant's allegations may have been more appropriately pleaded as a set-off in a counterclaim, failure to do so does not warrant judgment for plaintiff on the pleadings. Plaintiff was fully informed of the nature of defendant's claim and is not prejudiced by defendant's use of the label, "affirmative defense." Moreover, Section 43 of the Civil Practice Act sets forth the elements of an affirmative defense in terms broad enough to encompass defendant's allegations. It reads in part as follows:
"(4) The facts constituting any affirmative defense, such as payment, * * * and any defense which by other affirmative matter seeks to avoid the legal effect of or defeat the cause of action set forth in the complaint, * * * must be plainly set forth in the answer or reply."
In Prange v. City of Marion, 319 Ill. App. 136, 48 N.E.2d 980, it was held that the defense of payment, based upon the defendant's overpayment of interest to the plaintiff, was properly raised by answer in a suit against the city for nonpayment of special improvement bonds. The Civil Practice Act was designed to eliminate formalized rules of common law pleading and to provide procedure whereby substantive rights could be determined with a minimum of delay, technicality and expense. (Rank v. Rank, 107 Ill. App.2d 339, 246 N.E.2d 12.) In the instant case *392 defendant has set forth allegations of fact which, if proved, will establish gross misconduct on the part of plaintiff as an agent of defendant and the absence of any debt owed him by the defendant. Defendant is entitled to present such evidence and the trial court erred in entering judgment for plaintiff.
The judgment is reversed and the cause is remanded for such other and further proceedings as are not inconsistent with the views herein expressed.
Judgment reversed and cause remanded.
BURKE, P.J., and GOLDBERG, J., concur.
