MR. CHIEF JUSTICE BRANTLY
delivered the opinion of the court.
Plaintiff brought this action for damages for the loss of his right hand through the alleged negligence of the defendant. At the trial the court sustained defendant’s motion for nonsuit. Judgment was entered accordingly. Plaintiff has appealed.
At the time of the accident plaintiff, with four others, was employed by C. H. Strowbridge and Fred H. Holman in the operation of an ordinary circular woodsaw which was‘propelled by steam. Strowbridge and Holman had contracted with the defendant, through Jacob Louk, the foreman in charge of the ranch, to saw a quantity of logs into lengths rendering them suitable for use as stovewood on defendant’s ranch. They were to furnish their own machine and servants, and to receive $2.50 per hour. Strowbridge was not present. Holman was operating the machine. The logs were passed from left to right. To plaintiff was assigned the duty of operating the saw, which required him, as a log was passed, to force the carriage back with his left hand to bring the log in contact with the saw, and at the same time to hold the log steady by placing his right hand on it, *280a few inches to the left of the saw. To one of the other employees was assigned the task of carrying away the lengths or blocks as fast as they were cut off. To the remaining three was assigned the task of bringing the logs up and putting them upon the carriage or table of the machine. One of them (Worcester) was required also to act as guard by standing at the left of plaintiff, and, besides assisting to place the logs upon the carriage, to pass them along or feed them to the saw. It was also his duty, when a log was being placed upon the carriage, to see that it was not thrust against the log upon which plaintiff was engaged, and thus to prevent the obstruction of his part of the work and to guard him against the danger of having his right hand forced into contact with the saw. After the work had proceeded for a short time Louk voluntarily took the place of Worcester, saying, as he did so, that he wanted to do the feeding; that theretofore the wood had been cut too long, and that he wanted to see that it was cut short. On prior occasions Strowbridge and Holman'had cut wood for defendant. Two other subordinate employees of the defendant were engaged with Strowbridge and Holman’s employees in bringing up and placing logs upon the carriage. Whether they were doing this at the instance of Louk or not does not appear except inferentially from the fact that they were in the employ of the defendant and Louk was its foreman. Holman had not requested their services, nor was he to pay them any compensation. A few minutes after Louk took the place of Worcester a log was thrust against the end of a short piece of another in which plaintiff was about to make the last cut. This forced plaintiff’s hand upon the saw, with the result that it was so badly lacerated that amputation of it at the wrist was necessary. Holman and Strowbridge were equipped with help sufficient to enable them to carry out the contract without assistance from Louk and his subordinates. They therefore did not need any assistance. Plaintiff did not see Louk or either of his subordinates have hold of the log at the time he was hurt, because his attention was directed to the operation of the saw. Apart from *281displacing Worcester, Louk did not assume to control the conduct of the work, Holman continuing otherwise in control.
The complaint charges that while the plaintiff was engaged in the work of feeding the logs to the saw, under his employment aforesaid, the servants of the defendant negligently shoved against the log which plaintiff was feeding to the saw, another log which they were about to put upon the carriage, thus pushing the former and forcing plaintiff’s hand upon the saw, whereby it was cut off at the wrist. The answer, besides denying all the allegations of the complaint, alleges as special defenses that the plaintiff assumed the risk, and that the injury was caused by the negligence of his fellow-servants. All the evidence tendered by plaintiff was admitted without objection.
At the outset we are met with the contention by counsel for the defendant that the complaint does not state a cause of action, and that, however meritorious the case disclosed by plaintiff’s evidence, the judgment must be affirmed for this reason. The sufficiency of the complaint was not challenged in the trial court either by demurrer or by objection to the admission of evidence, and, though one of the grounds of the motion for non-suit was that the pleadings are not sufficient to support a judgment, this ground was apparently not seriously urged upon the attention of the court. The order sustaining the motion is couched in general terms, but the court seems to have proceeded upon the theory that the evidence is insufficient to make a case for the jury.
It is well settled by the decisions of this court that the [1] sufficiency of a complaint may be questioned for the first time on appeal, and that, if found fatally defective, a judgment rendered thereon for the plaintiff will be reversed. (Foster v. Wilson, 5 Mont. 53, 2 Pac. 310; Tracy v. Harmon, 17 Mont. 465, 43 Pac. 500; 81 sober v. Blackford, 46 Mont. 194, 127 Pac. 329; Cole v. Helena, L. & Ry. Co., 49 Mont. 443, 143 Pac. 974.) These cases merely give force to the rule declared by the statute (Rev. Codes, sec. 6539), that a failure to question the sufficiency of a complaint by demurrer in the trial court does not amount *282to a waiver of the right to question it thereafter. When, however, the point is made in this court for the first time on appeal, the objection is regarded with disfavor, and every reasonable deduction will be drawn from the facts stated in order to uphold [2] the pleading. So, also, will the pleading be held sufficient if the defect made the basis of the objection is not a matter going to the root of the cause of action, but is such as might have been remedied by an amendment. Again, though it be [3] deficient, in its omission to state a particular fact necessary to make out a cause of action, it will be deemed amended by the answer when the latter contains allegations which supply the omission (Wilson v. Harris 21 Mont. 374, 54 Pac. 46), or assumes that the complaint contains the' allegation in question. (Lynch, v. Bechtel, 19 Mont. 548, 48 Pac. 1112; Hefferlin v. Karlman, 29 Mont. 139, 74 Pac. 201; Stephens v. Conley, 48 Mont. 352, Ann. Cas. 1915D, 958, 138 Pac. 189.) And when a [4] trial has been had upon the evidence which has been introduced without objection, a judgment for plaintiff will not be reversed for a defective complaint, but the complaint will be regarded as having been amended in the trial court, if this is necessary to sustain the' judgment. (Moss v. Goodhart, 47 Mont. 257, 131 Pac. 1071.) When, under the same condition of the case, the judgment is for the defendant, whether on motion for nonsuit or on the merits, the point that the complaint is not sufficient will not be entertained, but the case will be considered on the merits and disposed of as if the proper amendment had been made upon request of plaintiff or by order of the trial court, unless .the defect is of such a character that it cannot be removed by an amendment. (Post v. Liberty, 45 Mont. 1, 121 Pac. 475; Lachman v. Simpson, 46 Mont. 518, 129 Pac. 325.) The rule applies also to the answer of the defendant. (Lachman v. Simpson, supra.) Of course if the sufficiency of the pleading has been challenged in the trial court by appropriate method, the ruling thereon properly presents a question for consideration by this court, and it will review the action of the trial court thereon and determine the rights of the par*283ties accordingly, subject to the injunction found in section 6593 of the Bevised Codes: “The court must, in every stage of an action, disregard any error or defect in the pleadings or proceedings which does not affect the substantial rights of the parties, and no judgment shall be reversed or affected by reason of such error or defect.”
It is elementary that, when a plaintiff seeks recovery for [5] actionable negligence, his complaint must allege facts showing these three elements: (1)- That the defendant was under a legal duty to protect him from the injury of which he complains; (2) that the defendant failed to perform this duty; and (3) that the injury was proximately caused by defendant’s delinquency. All of these elements combined constitute the cause of action; and if the complaint fails to disclose, directly or by fair inference from the facts alleged, the presence of all of them, it is insufficient, for it fails to state the facts constituting a cause of action. The rule, broadly stated, has application only to eases in which seasonable attack has been made upon the pleading in the trial court. If this is not done, and the defendant — as ivas the case here — allows the plaintiff to submit the case to a trial without objection, and permits him to establish by his evidence the presence of all the elements of his cause of action which the complaint shadows forth but fails to state as definitely as it might have done, even the trial court should not nonsuit plaintiff because of the defective pleading, but direct it to be amended so as to remove the defect. As already said, when the ease reaches this court, it will be presumed that the trial court has done its duty, and the defect will be disregarded. We have referred to the requirements to be observed in formulating a complaint in an action for wrong caused by negligence because the case at bar is one of that kind. The rule applies as well to any other kind of action.
We shall not quote the complaint in extenso. It is defective in that it does not state what was the relation of the defendant to Strowbridge and Holman. It does not allege that they were sawing wood for the defendant or that they were upon its prem*284ises; nor does it allege, except by way of conclusion, that Lout and his two subordinates were defendant’s servants, or were not servants of Strowbridge and Holman. In the absence of a statement of facts disclosing the relation existing between the defendant and Strowbridge and Holman, and the capacity in which Louk and his subordinates were acting, a liability on the part of the defendant is not made apparent, because it does not appear that defendant owed any duty to plaintiff. Under the rule of the cases cited, supra, however, the question before us is not one of pleading, but.one arising upon the pleading and evidence; in other words, whether the direction of nonsuit was proper is to be determined upon the pleading as aided by the evidence.
It appears from the above summary of the evidence that Strowbridge and Holman had an independent contract to saw a quantity of wood for the defendant, and were upon its premises for that purpose. They were furnishing their own employees, and needed no assistance. Louk, with his two subordinates, who inferentially acted under his direction, volunteered to assist in the accomplishment of the work. It does not appear whether Louk had hold of the log which pushed plaintiff’s hand upon the saw, but, inasmuch as he had assumed to perform Worcester’s duty, and this duty required him to assist in putting logs upon the carriage and to pass them to the saw, the fact that the injury occurred while he was engaged in doing this warrants the inference that he either alone or by the aid of his subordinates, in assisting the employees, of Strowbridge and Holman in bringing up the log, negligently thrust it forward too rapidly, and thus caused the plaintiff’s injury. That the employees of Strowbridge and Holman were negligent and their [6] negligence concurred with that of defendant’s servants would not exculpate the defendant. (Freeman v. Sand Coulee Coal Co., 25 Mont. 194, 64 Pac. 347.) The evidence is therefore sufficient to show prima facie that the injury was caused by Louk’s negligence, and hence that he became personally liable. Whether this wrong is imputable to the defendant de*285pends upon the further inquiry whether, by assuming the position he did, he became the fellow-servant of the plaintiff for the time, and, if not, he was acting within the scope of his employment by defendant.
We understand the accepted rule to be that the fellow-servant doctrine has no application to a case in which the injury [7] complained of was caused by the servant of a stranger to the common employment, even though such servant was at the time engaged in the same general operation as the injured servant. In such a case the injured servant will not be held to have assumed the risks incident to the negligence of the other, any more than he would the risks incident to the negligence of a stranger; and if the other at the time of the injury is acting within the general scope of his duty to his master, his master is liable under the rule of the maxim respondeat superior. On this subject Mr. Labatt says: “In eases where a third person is sued for injuries caused by the negligence of his servants, it is considered that the fact of their having been at the time of the accident engaged in the same general operation as the injured servant is not a sufficient ground for putting him upon a footing different from that upon which any other stranger would stand in an action against the same defendant for injuries caused by the negligence of his servants. That is to say, as the mere general knowledge that the servants of a person with whom a stranger is brought into contact in the transaction of every-day life may act negligently has never been considered to involve the corollary that he accepted the risks of the situation, so the rule is now well settled, both in this country and in England, that, ‘unless the person sought to be rendered liable for the negligence of his servant can show that the person so seeking to make him liable was himself in his service, the defense of common employment is not open to him.’ In brief, the doctrine of common employment ‘applies only where the action is brought for an injury to a servant or agent against the principal by whom such servant was himself employed.’ The rationale of this rule is that a defense which * * # is based *286upon the hypothesis that, as accessory to the contract of hiring, there is implied on the servant’s part an agreement to assume the risk of being injured by the negligence of his coemployees, cannot properly be invoked where he is suing a person with whom he has no contractual relations.” (4 Labatt on Master and Servant, sec. 1414.)
That Louk and his subordinates were not the servants of [8, 9] Strowbridge and Holman is apparent. Louk’s declared purpose at the time he displaced Worcester indicates this; for he took the place not merely to assist the work, but to see that it was done to meet his approval, thus indicating that he was not submitting himself to the control of Holman, and that he was assuming, for this purpose, to control the conduct of the work. Hnder the rule recognized by the authorities generally, he did not become the plaintiff’s fellow-servant; nor did his subordinates become such, for they were acting under his direction. “The real test by which to determine whether a person is acting as the servant of another is to ascertain whether at the time the injury was inflicted he was subject to such person’s orders and control and was liable to be discharged by him for disobedience of orders or misconduct.” (Wood, Law of Master and Servant, see. 317; see, also, 4 Thompson’s Com. on the Law of Negligence, 4996; 1 Shearman & Redfield on Negligence (5th ed.), sec. 225; United States Board & Paper Co. v. Landers (Ind. App.), 92 N. E. 203; Union Pac. Ry. Co. v Billeter, 28 Neb. 422, 44 N. W. 483). “The rule quoted by the greatest number of adjudged eases is that all who serve a common master, work under the same control, derive authority and compensation from the same common source, and are engaged in the same general business, though it may be in different grades or departments of it, are fellow-servants, who, under the rule under consideration, are deemed to take the risk of each other’s negligence. It is said that subjection to control and direction by the same general master in the same common object, and not the fact that employees are paid by the same general master, is the test of fellow service.” (4 Thompson’s Com. on the Law of Negligence, *287sec. 4917.) Under this test, Louk and his subordinates were acting upon his initiative, or else for the benefit of the defendant under their employment by it.
The servant of one master may temporarily enter the service [10] of another and for the time become the servant of the other; as when the servant is lent by his master to the other for the particular employment and becomes subject to the control of the other. For anything done in that' employment he becomes, for the time being, the servant of the person to whom he is lent, provided he has consented to be lent. (Johnson v. Lindsay, [1891] App. Cas. 371, L. J. Q. B. (n. s.) 90; Rourke v. White Moss Colliery Co., 2 C. P. D. (L. R.) 205; Delaware etc. Ry. Co. v. Hardy, 59 N. J. L. 35, 34 Atl. 986; Delory v. Blodgett, 185 Mass. 126, 102 Am. St. Rep. 328, 64 L. R. A. 114, 69 N. E. 1078.) The evidence in this case does not suggest that Louk and his subordinates were lent to Strowbridge and Holman by the defendant. So far as the evidence justifies any interference, it implies that for the time Louk was the alter ego of the defendant. Louk was therefore a stranger to the plaintiff. So, also, were his subordinates; and, since it appears that they were engaged with Louk in assisting in the bringing up and placing the logs in position to be sawed, they presumably contributed to his injury. But it would not affect the result if blame could not attach to them, but to Louk exclusively. All, however, were prima facie strangers to the plaintiff, and if it should be made to appear that any one of the three only caused his injury, this would be sufficient to fix liability upon him.
It remains, then, to inquire whether they were acting within the scope of their employment. In determining this question the inquiry is not, Was the servant at the particular time acting in obedience to the direction of the master? but, Was he acting [11,12] in furtherance of his master’s business? A servant may abandon his master’s employment for the time to accomplish some purpose of his own. If in accomplishing this purpose he does an injury to another, his master is hot liable; but a mere deviation from the master’s directions with reference to the *288business in which he is employed is not an abandonment of his employment and so long as he is doing some act in furtherance thereof,, he will be regarded as acting within its scope, and the master will not be excused on the ground that he did not authorize the particular act, or that he had no knowledge of it, or that in doing it the servant exceeded his authority, or, again, that he did it at a place to which his duty did not call him. (Barmore v. Vicksburg etc. Ry. Co., 85 Miss. 426, 3 Ann. Cas. 594, 70 L. R. A. 627, 38 South. 210; Geraty v. Nat. Ice Co., 16 App. Div. 174, 44 N. Y. Supp. 659; Higgins v. Watervliet T. & R. Co., 46 N. Y. 23, 7 Am. Rep. 293; Rounds v. Delaware, L. & W. R. Co., 64 N. Y. 129, 21 Am. Rep. 597; Evansville & T. H. R. Co. v. McKee, 99 Ind. 519, 50 Am. Rep. 102.) “The rationale of the master’s liability for tortious acts which ‘come within the scope of the servant’s general duty, although in doing the particular act complained of he may have exceeded his authority,’ is that, in most cases where a duty is to be performed or an act done by a servant, some discretion must be vested in him to whom the doing of it is committed; and, where this is so, the master cannot enjoy the benefit of his servant’s acts which involve this discretion without being responsible for their result. The rule is held especially applicable ‘where the master is absent, and the duty to be performed vicariously is general in character, as in the ease of conductors of public vehicles, railway servants and the like.’ ” (6 Labatt on Master and Servant, 6868.) Louk was in charge of the ranch. He had let the contract for the work, and it seems clear that it was his duty to see that it was properly done without loss of time.
As the solution of the question turns in each ease upon the proper inference to be drawn from the facts, if they present no conflict and furnish the basis for but a single inference, and [13] that favorable to the master, his freedom from liability is to be determined by the court as a question of law. If there is a conflict in the evidence, or more than one inference may be drawn from it, the liability of the master is an issue to be determined by the jury. (6 Labatt on Master and Servant, sec. 2275.)
*289We are of the opinion that the evidence here justifies a prima facie conclusion that Lout and his subordinates were within the line of their employment as servants of defendant, and thus a case was made for the jury.
The judgment is reversed and the cause remanded for trial on the merits.
Reversed and remanded.
Mr. Justice Sanner concurs.