
556 S.W.2d 955 (1977)
ADVANCE CONCRETE AND ASPHALT CO. and Turnpaco, Inc., Appellants,
v.
Sam INGELS, Harold Ingels, Ida K. Ingels and Beverly Ingels, and First Federal Savings and Loan Association of St. Joseph, Respondents.
No. KCD 28532.
Missouri Court of Appeals, Kansas City District.
August 29, 1977.
As Modified On Motion October 11, 1977.
Motion for Rehearing and/or Transfer Denied October 12, 1977.
David M. Rhodus, Morris, Larson, King, Stamper & Bold, Kansas City, for appellants.
Wm. Rex Bevers, Maryville, for respondents Sam and Harold Ingels.
*956 William H. Strop, St. Joseph, for respondent First Federal Savings.
Before SOMERVILLE, P. J., and WASSERSTROM and TURNAGE, JJ.
As Modified On Courts' Own Motion October 11, 1977.
WASSERSTROM, Judge.
This is a joint suit by Turnpaco, Inc. and Advance Concrete and Asphalt Co. for money damages and the establishment of a mechanics' lien. The trial court entered summary judgment for defendant First Federal Savings and Loan Association of St. Joseph and partial summary judgment for defendants Sam Ingels and Harold Ingels. Pursuant to a provision of those orders making them final for purposes of appeal, Turnpaco and Advance pursue this appeal. They urge as their single point that there exists an unresolved issue of material fact which prohibited the summary judgments rendered. We reverse.
This litigation arises from a contract signed by Sam Ingels and Turnpaco under which the latter was to furnish labor and material for a mobile home park, Thunderbird Mobile Home Estates. Turnpaco then subcontracted for the concrete work to be done by Advance. Claiming that $58,614.54 remained unpaid on the amount due it, Turnpaco filed its claim for mechanics' lien on May 17, 1974; and Advance claiming $89,226.55 filed its claim on May 22, 1974. Prior thereto, Advance had given notice of its claim which it delivered to Harold Ingels on May 10, 1974. A joint petition was filed in the Circuit Court by Turnpaco and Advance on November 15, 1974, against Harold and Sam Ingels, alleging those two to be the owners of the property and the ones who had contracted for the labor and material. First Federal Savings and Loan was joined as a defendant for the purpose of the plaintiffs' establishing priority of their mechanics' lien against the First Federal deed of trust.
On June 23, 1975, First Federal moved for summary judgment against both plaintiffs, and two days later Sam and Harold joined in those motions. The grounds set forth as the basis for summary judgment were that Sam's wife, Ida, and Harold's wife, Beverly, were co-owners of the property but had not been notified of the claims for mechanics' liens, had not been served with a statement of the claimed mechanics' liens, and had not been made parties defendants in this lawsuit. The movants attached to their motions copies of warranty deeds demonstrating the participation in title ownership by those two wives.
In response to those motions, on July 17, 1975, plaintiffs moved for leave to file an amended joint petition and concurrently they did file the proposed amended petition. The major change was to add Ida and Beverly as parties defendants and to add an allegation that "Defendants and each of them were partners, joint adventurers, and mutual agents with respect to one another for all purposes and all dealings with the aforedescribed real estate including the construction of improvements thereon and the operation of the Thunderbird Mobile Home Estates."
On October 2, 1975, the court held a hearing on the motions for summary judgment and the motion for leave to file an amended petition. At the conclusion of the hearing, those motions were all taken under advisement. While the motions were so pending, defendants on November 20, 1975, filed a motion for leave to refile their motions for summary judgment. The reason given for this new motion was so that "all motions may be adjudicated upon their merits and Court render order thereon."
On December 5, 1975, the court entered its order sustaining the motion for summary judgment by First Federal in full as to both plaintiffs and sustaining the motions of Sam and Harold against both plaintiffs with respect to the claim for mechanics' lien. (The order expressly excluded any ruling with respect to Turnpaco's claims for damages for alleged breach of contract.) The order stated as the basis for the summary judgment that the plaintiffs had "failed to comply with the Statutory procedure for impressing a mechanics' lien on the real estate subject to this litigation" and that in that respect there was no genuine *957 issue as to any material fact. As part of the order, the court further noted that "although properly included as parties Defendant to this litigation at the time of this disposition of these various motions for summary judgment, Beverly Ingels and Ida Kathleen Ingels have not entered their appearance on this record nor has service on them been requested on this record."
The court order of December 5, 1975, does not state in what respect the court believed that the plaintiffs had "failed to comply with the Statutory procedure." Defendants in their brief, however, offer the following two explanations: 1) that the plaintiffs had failed to include the wives as parties Defendant within the required statutory six month period; and 2) that evidence of record showed by unassailable proof that Sam and Harold were not agents on behalf of Ida and Beverly, so that there was no proper service of notice upon the latter two co-owners. These explanations will be discussed in reverse order.

I.

AGENCY
If Harold had no agency authority on behalf of Ida or Beverly, then the notice of claim for mechanics' lien served upon Harold in May, 1974, was ineffective to meet the statutory notice requirement of Sec. 429.100.[1] Even more fundamental, neither Harold nor Harold and Sam together had power to subject the land to a mechanics' lien in the absence of agency to act on behalf of the wives. Kaufmann v. Krahling, 519 S.W.2d 29 (Mo.App.1975); Bryant v. Bryant Construction Company, 425 S.W.2d 236 (Mo.App.1968); Poore v. International Paper Company, 455 S.W.2d 13 (Mo.App.1970).
Defendants argue that the evidence of record shows affirmatively and unassailably, as required for summary judgment under Rule 74.04(h), that there was no such agency. They rely for such proof upon the answers to interrogatories signed by Harold and filed of record on April 1, 1975, and on testimony given by Sam in his deposition which was filed October 21, 1975. So far as the answers to interrogatories are concerned, those answers do evidence that the wives were not partners in Thunderbird Mobile Home Estates. It can further be assumed (although this is far from certain) that those answers were sufficient to show that the husbands had no authority to bind the wives to any personal obligation on business contracts pertaining to the operation of the enterprise. However, nothing in those answers negatived the possibility of another limited type of agency, that is an agency for the special purpose of subjecting the wives' real estate interest to a mechanics' lien incident to the improvement thereof. The distinction between these two different types of agency has been sharply drawn in Bryant v. Bryant Construction Company, supra. Since the answers to interrogatories do not unassailably disprove agency for the purpose of subjecting the property to mechanics' lien, those answers are insufficient to support the summary judgments.
With respect to Sam's deposition, any consideration of that testimony is basically improper for the reason that the deposition was not filed until after the hearing on and submission of the motions for summary judgment. One important purpose of requiring a hearing on summary judgment is to insure the parties an opportunity to assemble and present all of their evidence for consideration by the court in connection with the motion. Sherman v. AAA Credit Service Corporation, 514 S.W.2d 642 (Mo. App.1974). Rule 74.04(c) provides for consideration of the pleadings, depositions and affidavits "on file." Since Sam's deposition was not on file at the time of the hearing held on October 2, 1975, plaintiffs did not have any notice that Sam's testimony would be taken into consideration and they subsequently had no opportunity to counter that deposition testimony. The motion for leave to refile the motions for summary judgment only intensified this point; for in that *958 motion to refile defendants stated it was "based on the facts and evidence adduced at the previous hearing [held October 2, 1975]," thereby lulling plaintiffs into the belief that only items on file as of that date would be taken into account.
Moreover, even if the deposition were to be considered, it affirmatively showed that Ida and Beverly did sign together with Sam and Harold the improvement loan in the sum of $330,000 to First Federal and that they also signed a deed of trust securing that note. This joining in those financing documents is significant and important evidence of participation by the wives in the transaction of improving the property and is substantial evidence upon which to subject their interests in the property to mechanics' liens. Bryant v. Bryant Construction Company, supra; Kaufmann v. Krehling, supra; Poore v. International Paper Company, supra.
The evidence of record taken as a whole does not show by unassailable proof as a matter of law that the husbands had no agency on behalf of the wives. Accordingly the summary judgments entered on December 5, 1975, cannot be sustained on that ground.

II.

FAILURE TO TIMELY JOIN THE WIVES AS PARTIES
This theory now advanced by defendants was not a ground for granting summary judgment by the trial court. To the contrary, the trial court stated in the order that Beverly and Ida had been "properly included as parties Defendant to this litigation at the time of this disposition of these various motions for summary judgment. . . ." Nevertheless, this theory must be considered, because the ruling of the trial court must be sustained if correct even though it may have been arrived at for the wrong reason. Ricketts v. Kansas City Stock Yards of Maine, 537 S.W.2d 613 (Mo. App. 1976).
Defendants are correct in their contention that additional parties cannot be joined in a suit to establish a mechanics' lien after the expiration of the six month period prescribed by Sec. 429.170. Hiller v. Schulte, 184 Mo.App. 42, 167 S.W. 461 (1914); Badger Lumber Co. v. Staley, 141 Mo.App. 295, 125 S.W. 779 (1910). The attempt to bring in the wives as parties defendant by amendment on July 17, 1975 (more than a year after the filing of the lien claim) was therefore a nullity so far as the claim of mechanics' lien is concerned. That would give the wives adequate reason to demand that claim be dismissed against them, had they been served at the time these motions were decided.
However, a right on the part of the wives to be dismissed in that regard does not give rise to any right by the other defendants to a summary judgment. In order to have such a right, they would have to show that the wives were necessary parties to a mechanics' lien adjudication. On that question defendants direct us to Sec. 429.190 which provides that: "the parties to the contract shall, and all other persons interested . . in the property charged with the lien may be made parties, but such as are not made parties shall not be bound by any such proceedings." (Emphasis added.)[2]
Under the statutory provision quoted, the wives would have to be parties to the contract in order to be necessary parties. The contract itself shows they were not signatorieswhich leaves only the question whether they were parties by way of agency through Sam. On this question, all the evidence relied upon by defendants to support their motion for summary judgment is submitted to show and does tend to show that neither husband had authority to bind either wife to any personal obligation on any partnership contract. Defendants' evidence therefore not only fails to show the wives to be necessary parties, but to the contrary their evidence contradicts such a conclusion.
*959 True, plaintiffs' amended petition alleges that the wives were contracting parties, and the court's order of December 5, 1975, apparently was intended to grant leave for that document to be filed. Nevertheless, those allegations are not conclusively binding upon plaintiffs, because they are subject to further amendment. For purposes of summary judgment, all factual matters must be resolved against the movants if any reasonable doubt appears, and it must therefore be taken for present purposes that the wives were not parties to the contract. Weldon, Williams & Lick v. L. B. Poultry Co., 537 S.W.2d 868, 871 (Mo.App. 1976).
Thus, the parties to the contract (Sam and Harold) were necessary parties, but Ida and Beverly are merely optional parties. Accordingly, even in the wives' absence as parties to the litigation of the mechanics' lien, the suit may proceed as originally filed against the original defendants. Of course, whatever judgment is entered at the conclusion of the litigation will not be binding on either Ida or Beverly, under the express terms of Sec. 429.190.[3]
Neither of the theories advanced by defendants justify the summary judgments entered. The order dated December 5, 1975, is therefore reversed and the cause is remanded for further proceedings.
All concur.
NOTES
[1]  All statutory references are to RSMo 1969.
[2]  The statutory section cited is identical with Rule 101.04.
[3]  Sam's deposition discloses that he and Ida became divorced July 8, 1974, and that she has relinquished to him all of her interest in this real estate.
