
22 Wn. App. 520 (1979)
591 P.2d 821
PARSONS SUPPLY, INC., Appellant,
v.
EUGENE A. SMITH, ET AL, Respondents.
No. 2932-2.
The Court of Appeals of Washington, Division Two.
January 25, 1979.
*521 Schroeter, Goldmark & Bender and John Goldmark, for appellant.
K.R. Whitehead and Gary Weber, for respondents.
PEARSON, C.J.
Parsons Supply, Inc., appeals from a judgment which held that Parsons wrongfully breached an employment contract with its employee, Smith, wrongfully obtained a preliminary injunction restraining Smith from soliciting Parsons' customers, and was not entitled to a permanent injunction to enforce a covenant not to compete. Smith cross-appeals from the trial court's refusal to grant him attorney's fees. We hold that there is substantial evidence to support the trial court's conclusion that Parsons Supply was not entitled to relief and we affirm that part of the judgment. However, we are of the opinion that partial attorney's fees ought to have been granted to Smith for successfully challenging a wrongful injunction, and we remand the case for this purpose.
Parsons Supply entered into a contract with Smith whereby Parsons agreed to employ Smith as a salesman *522 and give him an option to purchase the business.[1] Also contained in the contract was a covenant not to compete which barred Smith from directly or indirectly soliciting Parsons Supply's clients upon termination of his employment. Shortly after the contract was signed, Elmer Parsons, the owner of Parsons Supply, became seriously ill and Smith became manager of the business.
The purchase option was open from February 1, 1975, to September 30, 1975. During that time and while the parties were still negotiating the sale of the business, Parsons fired Smith and canceled the entire contract including the purchase option. Smith later formed his own business and competed with Parsons Supply by soliciting some of Parsons' customers. Parsons sued for breach of contract, interference with business relationships, and libel. Parsons also obtained a preliminary injunction restraining Smith from soliciting business from Parsons' customers.
The case was tried to the court. Parsons agreed to dismissal of the tortious interference and libel claims, relying on breach of contract as his only ground for remedy. Parsons asked for enforcement of the covenant not to compete by either a permanent injunction restraining Smith from competing for 5 years or, in the alternative, damages computed by Parsons' loss of profit over 5 years due to competition from Smith.
Smith defended on the ground that the covenant not to compete was unenforceable because Parsons Supply wrongfully repudiated the contract. Parsons disagreed. He claimed that he was entitled to cancel the agreement because Smith had violated his fiduciary obligation to the corporation by: (a) expanding the business and hiring additional employees, (b) holding himself out to customers as *523 the president or owner of the business, (c) using the company car on several occasions for personal errands, and (d) charging a dinner costing $47.39 to the corporation. The trial court concluded that Smith had not breached his fiduciary duty so "as to constitute a termination of the agreement."
[1] Both parties agree that if Parsons Supply breached the contract it is not entitled to enforce the covenant not to compete. See Tennessee Adjustment Serv., Inc. v. Miller, 54 Tenn. App. 313, 390 S.W.2d 696 (1964). This follows from the general rule that a breaching party cannot demand performance from the nonbreaching party. See, e.g., Lea v. Young, 168 Wash. 496, 12 P.2d 601 (1932).
[2, 3] The main issue, then, is whether Parsons was justified in discharging Smith.
A principal may not rightfully terminate the agency relationship before the end of the period for which he has agreed to employ the agent, unless the agent has committed a material breach of contract or has failed to perform a condition.
Williams v. Queen Fisheries, Inc., 2 Wn. App. 691, 694, 469 P.2d 583 (1970).[2] Our review of the trial court's finding is limited to a determination as to whether it is supported by substantial evidence. Seattle School Dist. 1 v. State, 90 Wn.2d 476, 488-89, 585 P.2d 71 (1978); Helman v. Sacred Heart Hosp., 62 Wn.2d 136, 147, 381 P.2d 605, 96 A.L.R.2d 1193 (1963).
The first ground Parsons chose to justify cancellation of the contract was that Smith greatly changed the character of the business. The trial court found that Parsons' disagreement with Smith on how to run the business was simply a matter of "difference in business philosophy." There was abundant evidence in the record that Smith was acting to improve the business, that the corporation had become more profitable, and that the other members of the board *524 of directors approved Smith's actions. There was no evidence that Smith was diverting corporate business to himself. Therefore, the trial court's finding that Smith was not disloyal to the corporation must stand.
[4] Parsons' three remaining reasons for canceling the contract involve minor abuses of the corporate office by Smith: misrepresentation of his position in the corporation, personal use of the company car on several weekends, and charging a family dinner to the corporation. We find no evidence that these actions were sanctioned by the board of directors or that the last two items were approved as employee compensation. Therefore, we must conclude, contrary to the trial court, that in these matters Smith breached his duty of loyalty to Parsons Supply. Despite this conclusion, we still agree with the trial court that no material breach of the contract occurred. The disloyalty shown by Smith as an officer of the corporation was rather insignificant when compared to the purposes of the contract and the amount of responsibility assumed by Smith. Perhaps Parsons would have been justified in removing Smith from the board of directors, taking away his corporate office, or suing him for restitution of benefits received; but he was not justified in canceling the entire contract. We are aware that a "willful violation of the duty of loyalty may constitute a material breach of the contract, even though the harm likely to arise from such breach is very small." Williams v. Queen Fisheries, Inc., supra at 694 (citing Restatement (Second) of Agency § 409 (1958)). But looking at the entire record and the argument on appeal, we cannot say that Smith's indiscretions amounted to a willful violation of his duties. Consequently, we affirm the judgment of the trial court denying enforcement of the covenant not to compete. See Gross v. Lynnwood, 90 Wn.2d 395, 401, 583 P.2d 1197 (1978).
[5] Next we examine Smith's contention that the trial court improperly denied his request for attorney's fees. As a general rule, attorney's fees are damages recoverable by the party who successfully resists a wrongful injunction. Berne *525 v. Maxham, 82 Wash. 235, 144 P. 23 (1914); Talbot v. Gray, 11 Wn. App. 807, 525 P.2d 801 (1974). See also RCW 7.40.080; CR 65(c). If the injunction is denied at a preliminary hearing, the general rule applies without qualification. See Annot., 164 A.L.R. 1088 (1946). However, when a preliminary injunction is not determined to be wrongful until after a trial on the merits, our courts apply the general rule very narrowly. Attorney's fees for the trial are recoverable as damages only if "injunctive relief is the sole purpose of the suit." Cecil v. Dominy, 69 Wn.2d 289, 293, 418 P.2d 233 (1966); Gray v. McDonald, 46 Wn.2d 574, 283 P.2d 135 (1955).[3] In the instant case, the trial court determined that injunctive relief was not the sole purpose of the suit. This conclusion was obviously correct in view of the pleadings and the extensive amount of evidence introduced to prove damages. While permanent injunctive relief may have been Parsons Supply's primary goal, it was not the sole purpose of the lawsuit. However, this does not end our discussion. The Cecil case makes clear that attorney's fees incurred in pretrial efforts to dissolve the injunction are recoverable and we so hold.
[W]here injunctive relief is not the sole purpose of the suit and only incidental or ancillary thereto, counsel fees as damages are recoverable only for services reasonably performed in attempting to quash the temporary injunction ...
Cecil v. Dominy, supra at 293. See generally 42 Am.Jur.2d Injunctions § 375 (1969).
*526 Accordingly, we remand for a determination as to attorney's fees incurred in pretrial attempts to dissolve the preliminary injunction. We affirm the trial court's judgment in all other respects.
REED and SOULE, JJ., concur.
NOTES
[1]  The record also shows that Smith was made secretary-treasurer of the corporation and placed on the board of directors. However, it is not clear whether Smith assumed these positions as the result of paragraph 2.1 of the contract or by some additional action by the board of directors.
[2]  The contract was to terminate upon failure to exercise the purchase option. The purchase option was to remain open for 1 year; therefore, Smith's term of employment under the contract was for 1 year.
[3]  Smith refers us to the case of Theis v. Federal Fin. Co., 4 Wn. App. 146, 480 P.2d 244 (1971), as authority for the proposition that attorney's fees incurred in a trial on the merits may be recovered as damages regardless of whether injunctive relief is the sole purpose of the suit or merely one aspect of it. If this is an accurate interpretation of Theis, then Theis was wrongly decided because it conflicts with Cecil v. Dominy, 69 Wn.2d 289, 418 P.2d 233 (1966) and Gray v. McDonald, 46 Wn.2d 574, 283 P.2d 135 (1955). Even the case relied upon by Theis does not support such a holding. It is possible to construe the Theis holding as an award of only those attorney's fees incurred in fighting the preliminary injunction and not for those accruing during the trial on the merits. Such an interpretation would be consistent with our holding below and the dictum of Cecil.
