
64 Cal.App.2d 908 (1944)
GEORGE W. NUTZEL, Appellant,
v.
WALTER KOZDRON et al., Respondents.
Civ. No. 14456. 
California Court of Appeals. Second Dist., Div. Two.  
June 15, 1944.
 Frank C. Weller and Thomas S. Tobin for Appellant.
 Leola Buck Kellogg and Montgomery G. Rice for Respondents.
 McCOMB, J.
 From an order granting defendants' motion to vacate an attachment levied on funds deposited by defendants in two Los Angeles banks, plaintiff appeals.
 These are the essential facts:
 On October 30, 1943, plaintiff filed a complaint against defendants in the form of a common count for money had and received in the sum of $9,200 and caused a writ of attachment to be levied upon funds which defendants had deposited in two Los Angeles banks. In order to secure the writ of attachment plaintiff's attorney filed an affidavit in which it was alleged that plaintiff's cause of action against defendants arose from the fact that defendants had forcibly robbed plaintiff of the sum of $9,200 on September 10, 1943.
 Defendants made a motion to vacate the writ of attachment theretofore issued; at the time of the hearing of the motion to dissolve the writ of attachment plaintiff's attorney filed an affidavit in opposition to the motion to vacate the attachment in which it was alleged that (a) on September 10, 1943, defendants in the city of Baltimore, Maryland, assaulted and robbed plaintiff of the sum of $9,200, and (b) defendants were not residents of the State of California and had left this state. The trial court granted defendants' motion to vacate the attachment theretofore issued.
 This is the sole question necessary for us to determine:
 Did the trial court err in granting defendants' motion to vacate the writ of attachment which had been issued?
 This question must be answered in the affirmative, and is governed by the following principles of law: *910
 [1] (1) An attachment lies in all cases of an implied contract for the payment of money when the defendant is a non-resident of this state. (Code Civ. Proc.,  537, subd. 2.)
 [2a] (2) If a defendant steals money from a plaintiff, an implied contract to repay the money arises. (Los Angeles Drug Co. v. Superior Court, 8 Cal.2d 71, 74 [63 P.2d 1124]; Philpott v. Superior Court, 1 Cal.2d 512, 521 et seq. [36 P.2d 635, 95 A.L.R. 990]; Armstrong v. Kubo & Co., 88 Cal.App. 331, 335 et seq. [263 P. 365].)
 [3] (3) Even though the original affidavit upon which a writ of attachment has been issued is defective in failing to state that defendant is a nonresident of this state, such defect may be remedied by the filing of an amended affidavit at or before the time of the hearing of a motion to dissolve the attachment. (Runkle v. Lane, 40 Cal.App.2d 654, 656 [105 P.2d 373]; Rosenberg v. Bullard, 127 Cal.App. 315, 320 [15 P.2d 870]; Hamburger v. Halperm, 28 Cal.App. 317, 318 [152 P. 61]; Nichols v. Davis, 23 Cal.App. 67, 69 [137 P. 41].)  [fn. *]
 [2b] Applying the foregoing rules to the facts of the instant case, as it appears from the affidavits which were on file at the time of the hearing of the motion to vacate the attachment that defendants had stolen money from plaintiff, thereby giving rise to an implied contract for the repayment of the amount of the stolen money; and since it was alleged in the amended affidavit, filed at the time of the hearing, that defendants were nonresidents of the State of California, under section 537, subdivision 2 of the Code of Civil Procedure, plaintiff was entitled to an attachment and the motion to dissolve the same should have been denied.
 The order from which the appeal is taken is reversed.
 Moore, P. J., and Wood (W. J.), J., concurred.
NOTES
[fn. *]  *. Fairbanks v. Getchell, 13 Cal.App. 458, 463 [110 P. 331], relied on by defendants, is inapplicable to the facts of the instant case because in that case there was not any affidavit filed when the attachment was issued and therefore nothing to amend, while in the present case an affidavit was filed when the writ of attachment was issued which was defective, but subject to amendment pursuant to the provisions of section 558 of the Code of Civil Procedure. (See Corum v. Superior Court, 114 Cal.App. 741, 744 et seq. [300 P. 837].)
