
    (No. 12809.
    Judgment affirmed.)
    Robert T. Shaw, Appellant, vs. Charles Dorris et al. Appellees.
    
      Opinion filed October 27, 1919
    
    Rehearing denied Dec. 5, 1919.
    
    1. Negligence — owner is not liable for negligence of independent contractor. An owner who contracts for the erection of a building with a contractor who occupies the relation of an independent contractor to said owner is not liable for injuries resulting from the negligence of such contractor or his servants or, employees.
    2. Same — obligation to furnish safe place to work applies only to relation of master and servant. The obligation to furnish a safe place to work applies only when the relation of master and servant exists and does not apply to an owner who has contracted with an independent contractor for the doing of work which does not create the relation.
    3. Same — when defendants need not plead specially that there were independent contractors. Where it necessarily follows from the allegations of the declaration that the defendants employed independent contractors for the doing of work in which negligence is charged defendants need not plead specially to that effect, as it is unnecessary to plead a defense which appears from the declaration.
    4. Practice — erroneous ruling as to pleading may be corrected-at any time before final judgment. It is the duty of the trial court, when it becomes satisfied that an erroneous ruling has been made concerning the sufficiency of a pleading, to set aside the ruling and correct the error, regardless of whether the erroneous order was made on the court’s own motion, and at any time before the entering of final judgment the whole record is before the court and an erroneous ruling theretofore made may he set aside.
    Appeal from the Appellate Court for the Second District; — heard in that court on writ of error to the Circuit Court of LaSalle county; the Hon. Edgar Eldredge, Judge, presiding.
    Browne & Wiley, and Butters & Clark, for appellant.
    Arthur H. Shay, and Duncan & O’Conor, for appellees.-
   Mr. Justice Carter

delivered the opinion of the court:

Appellant began this action on the case in the circuit court of LaSalle county in December, 1913, against appellees, who were doing business as co-partners as Charles Dorris & Co., and Emanuel Davis, to recover damages for personal injuries sustained on account of -the alleged negligence of the appellees. The trial was had before a jury in the circuit court and appellees were found guilty and the damages assessed at $5500. On motion a new trial was granted. The trial judge thereafter entered an order on the pleadings, reversing certain rulings formerly made by the circuit court. After these rulings on the pleadings, and the parties abiding by their pleadings, the court dismissed the suit and entered a judgment of nil dicit and for costs, and that judgment was affirmed by the Appellate Court for the Second District. A certificate of importance being issued by the Appellate Court, the cause is brought here by appeal.

The original declaration, consisting of three counts, states appellant’s cause of action substantially as follows: That appellees, Dorris & Co., were the owners of and constructing a certain brick building in the city of Streator on December 20, 1911; that the contract for the construetion of this building, including the brickwork, had been let to Emanuel Davis; “that said Davis had been engaged for the construction of the same and on the day aforesaid was in the completion of said construction; that the plaintiff was a contractor in steam-heating and general plumbing, and prior to the day aforesaid had undertaken the contract from said defendants, Charles Dorris, Thomas Basil-ion, George Dorris and James Geovanes, partners, etc., of putting in and installing the steam-heating and plumbing in said building, and was on the day aforesaid engaged in so putting in and installing said steam-heating and plumbing in said building; that it was the duty of said employers [naming them] to use all reasonable care to furnish a reasonably safe place for said plaintiff, and the men working under him in his said employ, to work, in so far as the construction of said building, aside from said installing of said steam-heating and plumbing, was concerned, and to use reasonable care to provide that the erection of said building was so carried on and the work of those erecting the same was so performed that the said premises where the plaintiff and those under him were compelled to work, as aforesaid, would be reasonably safe for said plaintiff and those undeT him.” The declaration further alleged that Emanuel Davis, to whom the contract for the construe-, tion of the building in question, 'including the brickwork, had been let, on the day in question was engaged in the construction of said building; that appellees, regardless of their duty and neglecting the same, carelessly allowed and permitted a number of . bricks, in the construction of said building to remain in a loose, dangerous and unstable condition, so that they were liable to fall and precipitate themselves upon the premises immediately below, and that by reason thereof, while plaintiff was engaged in the performance of his duty and in the exercise of all due care and caution for his own safety, and while he was necessarily passing out of a door in said building, said bricks at or near the top of the wall of the building became dislodged and fell upon appellant, severely injuring him. Appellees first filed general demurrers to the declaration, which were overruled. They thereupon filed the general issue and three special pleas. Appellant filed a special demurrer to the special pleas, which was sustained. Thereafter appellant dismissed the suit as to Davis, and during the first trial before the jury, on leave granted, added an additional count to the declaration, the same eliminating all allegations as to Davis. The count alleged, in substance, that appellees were erecting a two-story and basement brick building and employed appellant to do the work of installing the plumbing and heating; that it was the duty of the appellees to use reasonable care to furnish him a reasonably safe place to work; that they violated that duty, and that by reason thereof appellant, while performing his duty and in the exercise of. ordinary care, was injured by some bricks falling down off one of the walls upon him. Thereafter appellees filed the general issue and plea of the two years’ Statute of Limitations to the aforesaid additional count, to which plea of the Statute of Limitations the appellant demurred. Arguments were heard upon this demurrer as to said plea of the Statute of Limitations before one judge and the demurrer was sustained. The appellees then stood by their plea. Later, before another judge, a jury trial was held, with the result, as to the verdict, as heretofore stated. The second judge, on his own motion, after granting a motion for new trial, vacated the former order overruling the demurrer to the original declaration (the plea of general issue being still on file to the declaration) and sustained said demurrer to the declaration and vacated the previous order entered by the first judge sustaining the demurrer to the plea of the Statute of Limitations, and overruled said last mentioned demurrer. Appellant then abided by his declaration and appellees by their plea of the Statute of Limitations, and the court dismissed the suit.

The sustaining of the demurrer to the original declaration and the overruling of the demurrer to the plea of the Statute of Limitations are assigned as error. In our judgment it clearly appears from the original declaration, and each-count thereof, that appellees, members of the firm of Dorris & Co., were owners of the building in question which was in process of erection at the time of the injury; that Emanuel Davis, who was dismissed from the case, had entered into a contract with Dorris & Co. for the construction of said building, including the brickwork; that Davis was carrying out this construction and erecting said building on the location chosen by appellees in Streator, according to the plans furnished him by appellees; that appellant, also a contractor, had entered into a contract with Dorris & Co. to install a steam-heating plant. We can draw no other inference from the allegations of the original declaration than that both appellant and Davis were independent contractors. We find no facts in the original declaration from which any inference might be drawn that appellees had control of the work that was being done by either of these contractors or by the men employed by them to do the work. Appellant and Davis were not working under the direction of appellees but under the provisions of their respective contracts, and they were in no sense, accorcjing to the original declaration, servants of the owners of the building.

Counsel for appellant state that the substantial and material allegation of the declaration with- reference to appellant and appellees was that appellant was engaged as an employee of appellees. We cannot agree that the original declaration in any way fairly so alleges. The declaration alleged that appellant was a contractor, but we find no allegation which states, either directly or by inference, that he was an employee of appellees. All the allegations of the-original declaration are consistent with the conclusion that appellant was an independent contractor and not an employee in the sense that that word must be used here in order to allow a recovery under the original declaration.

Counsel for appellant also argue that the allegations of the original declaration do not show that Davis was an independent contractor. The declaration clearly alleges that Davis was a contractor and that the work of constructing the building, save the plumbing and heating, was let to Davis, a contractor and builder. It also alleges that appellees had plans and specifications made for their proposed new building, - and that the work by both appellant and Davis, contractors, was to be done in accordance with such plans and specifications. We think it necessarily follows, from the wording of the original declaration, that both Davis and appellant were independent contractors and that neither of them was an employee of appellees.

Counsel for the appellant earnestly and at length argue that the counts of the original declaration, construed most favorably to appellant, contain allegations sufficient, by implication at least, to charge appellees with a violation of the alleged common law duty the breach of which was the proximate cause of the injury, which counsel argue was sufficiently stated in the original declaration. We cannot so hold. If the original declaration stated a cause of action, even though defectively, and the amended declaration only stated the same cause of action more in detail, then there can be no question that the identity of the matter upon which the suit is founded is fully preserved. (Chicago City Railway Co. v. McMeen, 206 Ill. 108; Lake Shore and Michigan Southern Railway Co. v. Enright, 227 id. 403; Vogrin v. American Steel and Wire Co. 263 id. 474.) That is not the situation here. The original declaration, as already stated, only alleged that Davis was a contractor, and the only fair inference from such allegation in said original declaration was that appellant and Davis were independent contractors and that neither of them was an employee of the owners. Np facts are stated in the original declaration

from which the inference may be drawn that the owners of the building had any control of the work to be done thereon or of the men employed by the contractors to do the work. These contractors were working under contract and not under the direction of the owners of the building and were in no sense their servants. The original declaration charged that it was the duty of appellees to use reasonable care to furnish plaintiff with a reasonably safe place in which to work. No other duty is charged. The original declaration clearly stated a case within a general rule that the owner who contracts for the erection of a building with a contractor or builder who occupies the relation of an independent contractor to said owner, is not liable for injuries resulting from the negligence of such contractor or of his servants or employees. (Scammon v. City of Chicago, 25 Ill. 361; Mercer v. Jackson, 54 id. 397; Pfau v. Williamson, 63 id. 16; 12 Am. & Eng. Ency. of Law,— 2d ed. — 187-197, inch with authorities there cited.) The obligation to furnish a safe place to work in, applies only when the relation of master and servant exists, and not when a contract has been entered into with an independent contractor for the erection of a building, which does not create the relation. (Jefferson v. Jameson & Morse Co. 165 Ill. 138.) The demurrer thereto was properly sustained. The additional count set forth a new cause of action based upon the relation of master and servant, and was filed more than two years after the cause of action is alleged to have occurred. A plea of the Statute of Limitations was therefore a good defense to this count. (Doyle v. City of Sycamore, 193 Ill. 501; Carlin v. City of Chicago, 262 id. 564; New Staunton Coal Co. v. Fromm, 286 id. 254.) The demurrer to the plea of the Statute of Limitations to this additional count was therefore properly overruled. We do not think that the holding of this court in Raxworthy v. Heiser, 274 Ill. 398, is in any way in conflict with this holding. In that case the opinion expressly stated that the owner was liable to the person injured because the injured person was in his employ upon the same premises where the independent contractor was working, and that it was the duty of the owner to furnish his employees a reasonably safe place in which to work, and that therefore the owner was responsible for the injury because of the negligence of the independent contractor. The facts were so different there that the case can in no way be controlling here. Neither do we think the reasoning in North American Restaurant v. McElligott, 227 Ill. 317, in view of the facts there involved, is in any way in conflict with the reasoning in this opinion.

Counsel for appellant also argue that the declaration charges appellant was. directed to do certain work on said premises and that it was the duty of appellees to furnish him a safe place in which to perform the work, and that therefore it was incumbent upon appellees, if they desired to make the defense that appellant and Davis were independent contractors, to plead specially to that effect. In view of the allegations of the original declaration, as already stated, to the effect that Davis and appellant were independent contractors and were employed as such by appellees, it was not necessary for appellees to plead a defense which the declaration alleged already existed. The case of Carlson v. Johnson, 263 Ill. 556, cited by appellant, is not in point on this question. In that case the declaration alleged that the defendant, by his servants and agents, was engaged in repairing the building owned by him and that the plaintiff was injured through the negligence of said servants. There were no allegations in the declaration tending to show that the work was being done by an independent contractor, and the court there rightly held that if the defendant wished to rely on the defense that the person who acted as superintendent in overlooking the repairs was an independent contractor, that fact should be pleaded specially. There is no parallel between that case and this, for here appellant sets up in his declaration the fact that appellees had let and awarded the contracts for the construction of the entire building to Davis and appellant, and that they had entered upon the premises and were performing their contracts according to the plans and specifications prepared for appellees and in accordance with which the contracts had been executed.

Counsel for appellant further question the power and propriety of. the second judge, after verdict of the jury had been set aside and new trial granted, in setting aside and reversing the former rulings as to the pleadings made by the first judge. It is clear that after the motion for new trial was granted the court had the same power with reference to the pleadings and all other matters connected with the trial of the case as it had before the jury trial was had. (20 R. C. L. 317; 14 Ency. of Pl. & Pr. 992; 29 Cyc. 1033; 1 Spelling on New Trial and Appellate Practice, sec. 421.) There can be no question that it is the duty of the court, when it becomes satisfied that an erroneous ruling has been made concerning the sufficiency of a pleading, to set aside such ruling and correct the error. The mere fact that the erroneous order was made on the court’s own motion is of no consequence. At any time before the entering of such final judgment the whole record is before the court, and an erroneous ruling theretofore made may be set aside and the error corrected. (Fort Dearborn Lodge v. Klein, 115 Ill. 177; Dowie v. Priddle, 216 id. 553.) Beyond doubt, if the original declaration, as held here, did not state a cause of action, the trial court, after the motion for new trial was allowed, rightly reversed its former ruling in this regard and sustained the demurrer to the declaration. It necessarily follows, therefore, that the trial court also rightly reversed the former order and overruled the demurrer to the plea of the Statute of Limitations.

We find no error in the record. The judgment of the Appellate Court will be affirmed.

Judgment affirmed.  