This appeal is from an order dated June 30, 1989, granting appellee Kenneth Parker Associates’ (KPA) preliminary objections in the nature of a demurrer to count II of appellant’s complaint. Appellant contends that the trial court erred in (1) dismissing the count, without leave to amend, on the technical basis that several causes of action had been pleaded under one count in violation of Pa.R.Civ.P. 1020(d)(1); (2) finding that the complaint did not set forth sufficient facts to justify recovery for either punitive damages or emotional distress; and (3) raising, sua sponte, a defense which served as an alternate basis for dismissing the entire cause of action against KPA. For the reasons set forth below, we agree with appellant that the trial court erred in granting KPA’s preliminary objections and, accordingly, we reverse the order below and remand for proceedings consistent with this opinion.
Beginning in January of 1985, appellant was employed at KPA as a staff designer. On February 16, 1986, appellant enrolled both herself and her husband under an insurance policy written by defendant Allstate Insurance Company (Allstate), and made available to her by defendants Mediq Inc. (Mediq) and KPA. This action arose when the defen *224 dants refused to pay life insurance proceeds upon appellant’s husband’s death.
On February 7, 1989, appellant filed a complaint in three counts against KPA, Mediq, and Allstate, alleging breach of contract, negligence, estoppel, and fraud. The counts of the complaint were very similar except for the identity of the named defendant: count I was against Mediq, count II was against KPA, and count III was against Allstate. On March 29,1989, Mediq and KPA filed preliminary objections requesting that counts I and II of appellant’s complaint be dismissed. 1 In seeking dismissal, KPA and Mediq alleged that appellant violated Pa.R.Civ.P. 1020(d)(1) because she had failed to set forth her causes of action for trespass, contract, estoppel and fraud in separate counts. 2 Further, they alleged that appellant had failed to aver facts sufficient to support a claim for punitive damages and emotional distress in a contract action. In her response to the preliminary objections, appellant asserted that her complaint was not in violation of Rule 1020(d)(1) and should not be dismissed. In the alternative, she maintained that if the trial court did find that she had failed to comply with Rule 1020(d)(1), it should grant her request for leave to amend her complaint. In addition, appellant attached her proposed amended complaint to her response. On June 30, 1989, the trial court issued an order sustaining KPA’s preliminary objections, and completely striking count II of the complaint, thereby dismissing KPA from the case. The trial court, however, overruled the same preliminary objections made as to count I against Mediq and ordered it to file an answer within thirty days. On August 18, 1989, appellant *225 filed an appeal from the trial court’s June 30, 1989 order, 3 and on December 11,1989, the trial court issued its opinion. In that opinion, the trial court reasoned that a demurrer to count II was sustainable because (a) count II was improperly pleaded in that it presented several causes of action under one count, (b) to the extent appellant sought punitive and emotional distress damages, the count was defective in that it did not set forth distinct claims for negligence and fraud, and (c) KPA was immune from liability, in that it hired Mediq as an independent contractor for the purposes of administering the insurance plan. Moreover, the trial court went on to state that Mediq’s preliminary objections to count I had been inadvertently overruled. 4 Finally, the trial court noted that, had appellant filed a motion for reconsideration, leave to amend would have been granted in order to file a single cause of action for breach of contract against KPA. See Trial Court Opinion at 1-3.
Our scope of review in considering a challenge to a trial court’s decision granting preliminary objections in the nature of a demurrer is well-settled:
A demurrer can only be sustained where the complaint is clearly insufficient to establish the pleader’s right to relief. Firing v. Kephart,466 Pa. 560 ,353 A.2d 833 (1976). For the purpose of testing the legal sufficiency of the challenged pleading a preliminary objection in the nature of a demurrer admits as true all well-pleaded, material, relevant facts, Savitz v. Weinstein,395 Pa. 173 ,149 A.2d 110 (1959); March v. Banus,395 Pa. 629 ,151 A.2d 612 (1959), and every inference fairly deducible from *226 those facts, Hoffman v. Misericordia Hospital of Philadelphia,439 Pa. 501 ,267 A.2d 867 (1970); Troop v. Franklin Savings Trust,291 Pa. 18 ,139 A. 492 (1927). The pleader’s conclusions or averments of law are not considered to be admitted as true by a demurrer. Savitz v. Weinstein, supra.
Since the sustaining of a demurrer results in a denial of the pleader’s claim or a dismissal of his suit, a preliminary objection in the nature of a demurrer should be sustained only in cases that clearly and without doubt fail to state a claim for which relief may be granted. Schott v. Westinghouse Electric Corp.,436 Pa. 279 ,259 A.2d 443 (1969); Botwinick v. Credit Exchange, Inc.,419 Pa. 65 ,213 A.2d 349 (1965); Savitz v. Weinstein, supra; London v. Kingsley,368 Pa. 109 ,81 A.2d 870 (1951); Waldman v. Shoemaker,367 Pa. 587 ,80 A.2d 776 (1951). If the facte as pleaded state a claim for which relief may be granted under any theory of law then there is sufficient doubt to require the preliminary objection in the nature of a demurrer to be rejected. Packler v. State Employment Retirement Board,470 Pa. 368 , 371,368 A.2d 673 , 675 (1977); see also Schott v. Westinghouse Electric Corp., supra [436 Pa.] at 291,259 A.2d at 449 .
County of Allegheny v. Commonwealth,
First, appellant contends that the trial court erred in dismissing, without leave to amend, count II of her complaint on the basis that several causes of action were pleaded under one count in violation of Pa.R.Civ.P. 1020(d)(1). Appellant does not dispute that she violated this rule by raising several causes of action in one count. However, she argues that the violation was merely technical in nature and did not warrant a dismissal of the entire cause of action against KPA. Instead, appellant argues that the *227 proper course was to grant her leave to amend her complaint pursuant to Pa.R.Civ.P. 1033.
Rule 1033 provides in relevant part that:
A party, either by filed consent of the adverse party or by leave of court, may at any time change the form of action, correct the name of a party or amend his [or her] pleading.
Pa.R.Civ.P. 1033. It has long been the law in this Commonwealth to liberally grant leave to parties to amend their pleadings.
Biglan v. Biglan,
Here, we find that to the extent the trial court granted KPA’s preliminary objections and refused to allow appellant to amend her complaint based on the Rule 1020 defect, it abused its discretion. Appellant’s failure to set out each cause of action against KPA in a separate count is clearly a technical error, which in no respect affects the substance of the pleading.
See Commonwealth ex rel. Specter v.
*228
Bauer,
Appellant also takes issue with the court’s ruling on her claim for emotional distress and punitive damages. 6 Appellant maintains that the trial court based this decision on a misunderstanding of the causes of action and the corresponding damages requested in the original complaint. Appellant suggests that the court erroneously believed that because the various causes of action were brought within the same count, the negligence and fraud claims were merely alternative theories of liability based on the underlying breach of contract cause, and not separate causes of action. This misunderstanding, in turn, led to the court’s conclusion that appellant failed to set forth a claim for punitive damages or emotional distress.
A review of appellant’s original complaint reveals that although all three claims (negligence, fraud, and breach of contract) are contained in one count, the facts as set forth in the complaint establish the essential elements of each cause of action. Moreover, appellant’s claims for negligence and fraud are set out in separate paragraphs and are distinguishable from her claim for breach of contract. Appellant’s prayer for relief in the form of punitive and emotional distress damages are not requested until after her claims for negligence and fraud. These types of damages, of course, are recoverable under these two theories of *230 liability. See Restatement (Second) of Contracts, § 355, at 154 (1981) (punitive damages are not recoverable in action for breach of contract but are recoverable in tort action brought in conjunction with action for breach of contract); Restatement (Second) of Torts, § 908 comment b, at 464 (1977) (same). Thus, in admitting as true all well-pleaded material facts, and every inference deducible from those facts, we find that count II set forth facts sufficient to state a claim for relief under negligence and fraud as well as breach of contract, and thus, appellant should be afforded the opportunity to request punitive and emotional distress damages.
Appellant finally contends that the trial court erred by raising, sua sponte, a defense which served as an alternative basis for dismissing the entire cause of action against KPA. Appellant notes that the trial court, sua sponte, found that KPA, as appellant’s employer, was immune from liability because it had hired Mediq, an independent contractor, for purposes of implementing the insurance policy in question. Appellant maintains that it was a clear error for the court to raise this supposed immunity defense, sua sponte, as a basis for dismissing the entire cause of action against KPA. 7 We agree.
It is inappropriate, of course, for a trial court to act as an advocate and raise a defense on behalf of a party.
See Wojciechowski v. Murray,
For the foregoing reasons, we reverse the order below and remand for proceedings consistent with this opinion.
Order reversed and case remanded. Jurisdiction relinquished.
Notes
. Allstate did not file preliminary objections; accordingly, it is not a party to this appeal.
. Pa.R.Civ.P. 1020(d)(1) provides that:
If a transaction or occurrence gives rise to more than one cause of action against the same person, including causes of action in the alternative, they shall be joined in separate counts in the action against any such person.
Id.
. The June 30, 1989 order was not entered on the docket until July 20, 1989. Thus, appellant’s appeal was timely filed. Moreover, the trial court’s refusal to grant appellant leave to amend her complaint so as to cure the technical errors is a final and appealable order because it effectively puts appellant out of court as to KPA.
See Gabriel v. O’Hara,
. We note that, on appeal, KPA filed an appellate brief in conjunction with Mediq. However, despite the trial court’s pronouncement in its December 11, 1989 opinion, the record contains no appealable order as to Mediq. Thus, we will review only the propriety of the demurrer as to count II of the complaint.
. Appellee argues that the trial court was well within its discretion in refusing to grant appellant leave to amend her complaint because appellant, "having failed to utilize the various procedural remedies available to her to correct a defect in her complaint at the trial level, has waived her right to amend her complaint." Appellee Brief at 7. This claim is meritless. Appellant requested leave to amend her complaint at the trial level in her response to appellees’ preliminary objections. She also attached a copy of her proposed amended complaint to her response. Thus, the trial court was aware of appellant’s informal request to amend her complaint at the trial level. Moreover, the trial court, recognizing that appellant had requested leave to amend her complaint, stated in its opinion that had appellant filed a formal motion to reconsider, the court would have granted her leave to amend her complaint.
. This ruling alone is not enough to warrant sustaining preliminary objections to the whole count.
. We need not determine whether the defense raised by the trial court was appropriate in light of the factual circumstances of this case. However, we do note that the complaint is devoid of any information leading to the conclusion that KPA hired Mediq as an independent contractor. In fact, appellant alleges in her complaint that "at all applicable times, defendant KPA was a wholly-owned subsidiary corporation of defendant Mediq.” See Appellant’s Complaint, R.R. at 5a.
