
241 Cal.App.2d 330 (1966)
ARMAND G. HAURAT, Petitioner,
v.
THE SUPERIOR COURT OF LOS ANGELES COUNTY, Respondent; GROVER D. KING, Real Party in Interest.
Civ. No. 30202. 
California Court of Appeals. Second Dist., Div. Three.  
Apr. 4, 1966.
 Ricardo J. Hecht for Petitioner.
 No appearance for Respondent.
 Bewley, Knoop, Lassleben & Whelan and Edward A. Miller for Real Party in Interest.
 FRAMPTON, J. pro tem.  [fn. *]
 Petitioner seeks a writ of mandate to compel the superior court to vacate and set aside its order denying, and to grant his motion for, a change of venue from Los Angeles County to the City and County of San Francisco.
 The real party in interest filed his complaint in Los Angeles County. Petitioner, defendant, filed his answer and notice of motion, supported by his affidavit, for a change of venue on the sole ground that he resided in the City and County of San Francisco. The real party filed opposition to the motion and notice of countermotion for an order to retain the action in Los Angeles County on the ground that convenience of witnesses and the ends of justice would thereby be promoted. In support thereof he filed a declaration in which, among other things, he declared that the action is based upon the breach by *332 petitioner of an agency agreement which was made in Los Angeles County.
 The petition states that the trial court denied the motion for change of venue and ordered the countermotion off calendar. The real party has filed no answer to the petition. In such case we may assume the truth of the statements made in the petition. Since it appears that the countermotion was not heard, it follows that the retention of venue as laid was based solely on the ground that Los Angeles County was a proper county for trial of the action.
 [1a] The complaint sets forth three causes of action. The first cause of action is entitled "Restitution of Converted Funds." It is alleged therein that the parties entered into an oral agreement whereby real party employed petitioner as an agent and delivered to him $2,300 to be used to obtain an option on a racehorse, an additional $20,700 to complete the purchase, and an additional $2,300 as payment of an agreed commission to petitioner; petitioner did not use the initial $2,300 to acquire the option, but converted said sum to his own use; petitioner used only $14,223 to purchase the horse and misappropriated and converted to his own use $8,777; thereafter real party learned that petitioner had obtained a secret profit from the transaction and had converted said sum to his own use; real party has demanded the return of said sum of $8,777 and the sum of $2,300 paid as commission; petitioner has failed and refused to return said sums; there is now due, owing and unpaid the sum of $8,777 together with interest at 7 percent from May 21, 1965 and $2,300 together with interest at the rate of 7 percent from June 11, 1965; petitioner converted said funds knowingly and intentionally and for the purpose of defrauding real party, and accordingly real party seeks as exemplary damages the sum of $10,000 in addition to restitution of the sums mentioned.
 The second cause of action is entitled "Money Had and Received." It sets forth a common count for $11,077 with interest at 7 percent from July 28, 1965.
 The third cause of action is entitled "Accounting." It incorporates all the allegations of the first cause of action and further alleges that real party has demanded of petitioner a complete accounting of said funds and any secret profits made by petitioner, but that petitioner has failed and refused to render same and to pay over said converted funds and any secret profits.
 The prayer seeks a judgment for the sums mentioned, including exemplary damages, or, in the alternative, an accounting *333 and judgment for all sums found owing to real party, together with judgment for the amount of the commission paid to petitioner.
 The petitioner contends that the causes of action set forth in the complaint are ex delicto in nature, that the real party seeks equitable remedies, and for these reasons a change of venue to the city and county of his residence should have been granted. In the court below the real party contended that the action sounds in contract in that it alleges a breach of the agency agreement which was made in Los Angeles County and that under the provisions of section 395 of the Code of Civil Procedure, venue is proper in Los Angeles County.
 [2] The general rule is that the residence of defendant is the proper place for trial, and this applies to personal torts not involving physical injury, including conversion. (Spangenberg v. Spangenberg, 123 Cal.App. 387 [11 P.2d 408] (conversion); Sausen v. Anderton, 129 Cal.App.2d 324 [276 P.2d 814] (fraud).) It also applies to contract actions with certain exceptions set out in section 395 of the Code of Civil Procedure. That section reads in part:
 "(1) In all other cases, except as in this section otherwise provided, and subject to the power of the court to transfer actions or proceedings as provided in this title, the county in which the defendants, or some of them, reside at the commencement of the action, is the proper county for the trial of the action. ... When a defendant has contracted to perform an obligation in a particular county, either the county where such obligation is to be performed, or in which the contract in fact was entered into, or the county in which the defendant, or any such defendant, resides at the commencement of the action, shall be a proper county for the trial of an action founded on such obligation, and the county in which such obligation is incurred shall be deemed to be the county in which it is to be performed unless there is a special contract in writing to the contrary."
 [3] When several causes of action are alleged in a complaint a motion for change of venue must be granted on all causes if defendant is entitled to a change on any one (Quick v. Corsaro, 180 Cal.App.2d 831, 835 [4 Cal.Rptr. 674]; Johnson v. Superior Court, 232 Cal.App.2d 212, 217 [42 Cal.Rptr. 645]). Thus petitioner in the present proceeding is entitled to a transfer of the action to the county of his residence unless Los Angeles County is proper as to each count. *334
 [4] "In passing upon a motion for a change of venue the court must take the pleading as it is written; its sufficiency is not before the court, and the court may not speculate upon the appearance of the complaint after it is challenged by demurrer or as it may be tested by motions to strike. [Citations.]" (Johnson v. Superior Court, supra, 232 Cal.App.2d 212, 217-218.) All ambiguities will be construed against the pleader to the end that a defendant shall not be deprived improperly of his fundamental right to have the cause tried in the county of his residence. (Bybee v. Fairchild, 75 Cal.App.2d 35, 37 [170 P.2d 54]; Kaluzok v. Brisson, 27 Cal.2d 760 [167 P.2d 481, 163 A.L.R. 1308].)
 [1b] It is apparent that each count of the present complaint involves an agency relation arising from an agreement between the parties. Agency is both a consensual and a fiduciary relation. An agent is not merely a promiser or a promisee. The existence of the fiduciary relation modifies all agency agreements and creates rules which do not apply to contracts in which one party is not an agent for the other. The obligations of an agent are the same as those imposed on a trustee (Civ. Code,  2322, subd. 3; Rodes v. Shannon, 222 Cal.App.2d 721, 725 [35 Cal.Rptr. 339]). Unless otherwise agreed, an agent who makes a profit in connection with transactions conducted by him on behalf of the principal is under a duty to give such profit to the principal. (Rest. 2d Agency,  388.) The principal has a cause of action either for a breach of contract or for a tort as a remedy for damage caused by the violation of any duty of loyalty on the part of an agent. He may also charge the agent with anything the agent receives as the result of a violation of duty (Rest. 2d Agency,  403). A tort action is not based upon the theory that the agent has failed to perform his promise, but upon the theory that the agent has improperly dealt with the affairs entrusted to him by the principal. In such case, however, the question of whether or not the agent has improperly managed the principal's affairs depends upon the interpretation of his agreement with the principal. (See Rest. 2d Agency,  376, com. a.)
 Where the recovery sought is the return of secret profits or other benefits, the gist of the action is in quasi contract on the promise implied by law that an agent holds such property or monies for his principal. (Arcturus Mfg. Corp. v. Rork, 198 Cal.App.2d 208, 213 [17 Cal.Rptr. 758]; Crogan v. Metz, 47 Cal.2d 398 [303 P.2d 1029]; Oil Well Core Drilling Co. v. Barnhart, 20 Cal.App.2d 677 [67 P.2d 696]; Los Angeles Drug *335 Co. v. Superior Court, 8 Cal.2d 71 [63 P.2d 1124].) And the fact that the plaintiff additionally seeks an accounting does not alter the ex contractu nature of the action. (Arcturus Mfg. Corp. v. Rork, supra, at p. 213.) On the other hand, where the plaintiff also seeks damages of a punitive nature, his recovery is necessarily dependent upon a showing of tortious conduct on the part of defendant. In such case it cannot be said that the gravamen of the action is ex contractu and that allegations of conversion or fraud are only incidental to the recovery of secret profits. (See Hill v. Superior Court, 16 Cal.2d 527, 530-531 [106 P.2d 876]; Steiner v. Rowley, 35 Cal.2d 713 [221 P.2d 9].)
 Section 3294 of the Civil Code provides: "In an action for the breach of an obligation not arising from contract, where the defendant has been guilty of oppression, fraud, or malice, express or implied, the plaintiff, in addition to the actual damages, may recover damages for the sake of example and by way of punishing the defendant." The primary purpose of this limitation is to avoid injecting questions of fraud, malice, or oppression into contract actions, since most contract breaches arise from inability to perform or uncertainty as to the scope of the obligation, and the defendant is subject to strict liability upon a showing of breach regardless of his intent. (McCormick (1935) Damages, p. 291; see Freedman v. Rector etc. of St. Matthias Parish, 37 Cal.2d 16, 22 [230 P.2d 629, 31 A.L.R.2d 1].)
 In Haigler v. Donnelly, 18 Cal.2d 674 [117 P.2d 331], the court upheld an award for punitive damages. The first cause of action alleged was one for money had and received. The second cause of action alleged that defendant, while acting as agent for plaintiffs, received a stipulated sum of money belonging to plaintiffs and maliciously and fraudulently refused to account for it after proper demand. The court characterized the first cause of action as ex contractu in nature, being founded upon a promise implied in law. It characterized the second cause of action as ex delicto in nature, since it contained the essential elements of an action for conversion.
 In Steiner v. Rowley, supra, 35 Cal.2d 713, on appeal from a judgment entered upon an order sustaining the defendant's demurrers to the complaint, the judgment was reversed with directions to the trial court to overrule the demurrers to the first three counts. It affirmed the sustaining of the demurrer to the fourth cause of action without leave to amend. Count I alleged plaintiffs employed defendant as a broker; defendant *336 received a side payment and secret profit, in violation of his duty to deal honestly and fairly, and held $2,000 thereby for plaintiffs; Count II was for money had and received; Count III alleged that defendant received $2,000 out of escrow pursuant to the instructions of the grantees of the property purchased by plaintiffs and that the instructions were not assented to or known by plaintiffs; Count IV alleged defendant obtained the $2,000 by fraud, oppression and malice, for which plaintiffs were entitled to exemplary damages. The prayer sought recovery of a commission of $400 paid to the broker, $2,000 received as secret profits, and exemplary damages. Plaintiffs had obtained a writ of attachment prior to the hearing on demurrer. The court concluded: all of the counts were based on the same transaction; the first and third counts each properly pleaded a cause of action to recover from a fiduciary his commission and profits, although the first alleged that the profits were secret profits and the third alleged they were shown in the escrow; the second count for money had and received was sufficient for the recovery of a secret profit upon the theory of general assumpsit; that the fourth count alleged an action for tort in which exemplary damages were sought which, while inconsistent with one for money had and received, did not constitute an election because inconsistent counts are permissible; but that plaintiffs, having obtained an attachment, had thereby elected to pursue the contractual remedy and thus the demurrer to the count seeking exemplary damages was properly sustained without leave to amend.
 In Crogan v. Metz, supra, 47 Cal.2d 398, on appeal from a judgment in favor of plaintiffs in an action to recover secret profits made by brokers in a real estate transaction, the court affirmed the judgment as to certain brokers, but modified it by striking an award for punitive damages. The lower court had awarded both compensatory and exemplary damages without indicating upon which of the theories pleaded it had based its judgment. The first count alleged that defendants through fraudulent representations induced plaintiffs to purchase certain property; the second count alleged that defendants, acting as agents for the plaintiffs, "retained" secret profits; the third count alleged a conspiracy by defendants to defraud plaintiffs; the prayer sought punitive damages for Counts I and III. The judgment awarded to plaintiffs the amount of the secret profit. There was no evidence as to the difference between the value of the property and the amount which plaintiffs parted with, which is the measure of damages in a suit *337 based on fraud in the sale of real property. There was no evidence directed to the conspiracy count. The court concluded that only the second count based on the violation of a fiduciary duty was supported by the evidence, and that punitive damages could not be granted because it was in the nature of a common count for money had and received and thus based on breach of contract implied in law.
 [5] Venue is determined on the basis of the complaint as it stands at the time the motion to change is made, and the plaintiff is not permitted to make a subsequent election of theories by proposed amendments thereto (Warren v. Ritter, 61 Cal.App.2d 403 [142 P.2d 948]) or affidavits in opposition to the motion (Archer v. Superior Court, 202 Cal.App.2d 417, 420 [21 Cal.Rptr. 48]).
 [1c] The present pleading incorporates in Counts I and III allegations which state causes of action both ex contractu and ex delicto in nature. While the use of language such as "converted" and "misappropriated" may not necessarily be determinative, it seems clear that a complaint in which there are allegations in support of and a prayer seeking exemplary damages cannot be categorized as solely ex contractu in nature.
 Since the plaintiff has plead a cause of action based upon the tort of conversion, the defendant has a right to have the action tried in the county of his residence (Mason v. Buck, 99 Cal.App. 219, 221 [278 P. 461]; Spangenberg v. Spangenberg, supra, 123 Cal.App. 387, 390-391), unless it should be made to appear that the convenience of the witnesses or the ends of justice will thereby be promoted if the action is retained in the county where commenced. (Code Civ. Proc.,  396b; Braunstein v. Superior Court, 225 Cal.App.2d 691, 697 [37 Cal.Rptr. 666].)
 Since the denial of the motion for change of venue based upon the residence of the defendant was in error and since the trial court refused to hear the countermotion for the retention of venue based upon the convenience of the witnesses, the respondent court is directed to set aside the order of January 7, 1966, denying the motion for a change of venue, and is further directed to reinstate the countermotion to the court's calendar and to hear and determine such motion on its merits.
 Let the peremptory writ issue accordingly.
 Shinn, P. J., and Ford, J., concurred.
NOTES
[fn. *]  *. Retired judge of the superior court sitting under assignment by the Chairman of the Judicial Council.
