delivered the opinion of the court.
This is an appeal from a decree awarding a mechanic’s lien to appellee upon premises purchased by appellant after the making of the improvement in question. The petition and lien claim allege that the contract for furnishing the materials and doing the work in respect of which the lien is sought was made by appellee with James J. McGovern and Catherine Cosgrove, and that these two are the owners of the premises upon which the improvement was made. From the undisputed proof it appears that their ownership was not joint, but successive. McGovern, having been the owner of the premises, conveyed them to Catherine Cos-grove and the” title of record was in her before the making of the contract. Although the variance was pointed out below, the petition was not amended.
Appellee testified unequivocally that he had made the *492original contract and also one for extra work with John C. Cosgrove, father of appellant and husband of Catherine Cosgrove. Afterwards it appeared that in making the contract John C. Cosgrove was acting for his wife, the then owner of the improved premises, but this appellee did not know at the time. It appears also that McGovern, the former owner, took some part in the negotiations leading up to the making of the contract, but it is quite pertain from appellee’s own and other testimony that McGovern was no party to it and that it was entered into between appellee and Catherine Cosgrove acting through an undisclosed agent, her husband. In this regard piso there is a variance between the proofs and the allegations; and it was error to enter the decree without previous amendment of the petition. In coming to this conclusion we do not ignore the proof tending to show that appellee delivered to Cosgrove a bid for the work addressed to McGovern; but' it does not appear that the bid ever reached McGovern’s hands, or that he took any action on it, and Cosgrove was not McGovern’s agent.
Yihether the lien claim need be and can be amended are questions which have not been argued and are not decided.
The proof shows and the master finds that upon the completion of the work John C. Cosgrove paid appellee $G6.15 and delivered to him in full of the balance due under the contract and for extras three promissory notes aggregating §200, each of the notes being signed by James J. McGovern, payable to the order of John C. Cosgrove and by him endorsed. If a petitioner for a mechanic’s lien takes other security either on property or of persons to satisfy him for his labor and materials,'the statutory lien will be discharged. Kinzey v. Thomas, 28 Ill. 502; Croskey v. Corey, 48 Ill. 442; Clement v. Newton, 78 Ill. 427; Kankakee Coal Co. v. Mfg. Co., 138 Ill. 207; Lyon Lumber Co. v. Investment Co., 174 Ill. 31. Even if it be conceded'that inasmuch as appellee treated John C. Cosgrove as principal and was ignorant of his being an agent he did not waive his lien by taking the notes with Cosgrove’s indorsement thereon, yet *493he did waive it when he accepted the notes executed as they were by McGovern, a stranger to the transaction. Appellant, however, is not in a position to urge the waiver of the lien. His answer to the petition is simply a denial of its allegations, and sets up no affirmative matter or defense. Where the defense is not pleaded, it cannot be availed of even if it appear in the evidence. Johnson v. Johnson, 114 Ill. 611.
We have examined the claim for lien and find it sufficient in all respects except as hereinbefore noted.
The decree appealed from is reversed and the cause remanded with leave to the parties to amend their pleadings, if they so desire, and for such further proceedings as are not inconsistent with the views expressed' in this opinion.
Heversed and remanded.