The Vaughan Construction Company, Incorporated, a Virginia corporation doing business in this state, in June, 1913, entered into a contract in writing to furnish the necessary labor, implements and material and to do and perform certain construction work for the Virginian Railway Company between Mullens and Bud on its main line, and between Mullens and Tam on its Winding Gulf branch line. As permitted by the contract and with the approval of the Virginian Railway Company, the other party thereto, the Vaughan Construction Company, Incorporated, sublet a part of the work to Gist Brothers Company, a partnership, and the residue to the Vaughan Construction Company, a West Virginia corporation, and the subcontractors completed the part undertaken by them sometime prior to November 10, 1914.
The parties did not stipulate a gross sum as compensation for the work in its entirety, but. did classify it and fix a schedule of prices for each class, ninety per cent thereof to be paid *660monthly during the progress of the work, the payments to be based upon the estimates of the chief engineer of the Virginian Railway Company, and the final payment to be upon a like estimate upon the completion of the work, and to include the ten per cent reserved and deducted from previous estimates, except in the case of the part performed by the Vaughan Construction Company of "West Virginia, which was to be done upon what is termed generally a “force account”, and paid for upon like estimates.
The work undertaken by them the subcontractors completed sometime before November 10, 1914, apparently to the satisfaction of the Virginian Railway Company, and on that day the engineer estimated and certified the balance due under the terms of the contract to be $15,663.56. Being dissatisfied with this estimated balance for the labor and material furnished and the work done by them, Gist Brothers Company caused to be prepared, filed and .recorded as required by law a mechanics lien amounting to $79,959.02, this amount including extra work done by them by way of amendments or modifications later agreed to by the parties to the contract, as well as work expressly stipulated in the original contract. The Vaughan Construction Company of West Virginia did not undertake to bind the property of the Virginian Railway Company by a like lien for any balance due it. Gist Brothers Company in due time instituted in Wyoming County a suit to enforce the lien so acquired, and made parties thereto the Virginian Railway Company, Vaughan Construction Company, Incorporated, and the Vaughan Construction Company of West Virginia. The Vaughan Construction Company, Incorporated, by an answer in the nature of a cross-bill, to which all persons interested were made parties defendant and served with process to answer, sought an accounting with the Virginian Railway Company and the two subcontractors of all matters arising out of the performance of the construction contract, and a decree for any balance that might be found to be due upon such audit. This answer the circuit court dismissed as insufficient and inappropriate in a inechanics lien suit. This court upon appeal sustained *661that ruling and affirmed tbe dismissal decree for reasons stated in the opinion. Gist v. Railway Co., 79 W. Va. 167.
After the decree in that case, the Yaughan Construction Company, Incorporated, brought this action in assumpsit in Mercer County to recover as upon a quantum meruit, the declaration containing the common counts only, and when, upon oyer craved, the contract between the plaintiff and defendant was produced, filed and made part of the record, the defendant demurred to the declaration, and, that challenge being overruled, as properly it was, tendered and was permitted to file the general issue plea and two special pleas, which, though they differ in phraseology, purport to present one issue only. Stripped of verbal formalities the defense interposed by each of them rests upon a provision of the contract requiring the plaintiff to secure and deliver to the defendant a release of all claims, demands and accounts for labor, material and supplies that are or may become liens against the property of the defendant company as a condition precedent to any suit or action by the plaintiff for a cause arising out of the contract.
To each of the pleas plaintiff tendered and was permitted to file a special replication to the effect that by an inequitable, unjust and inadequate final estimate of the balance due plaintiff upon the termination of the work undertaken, amounting to gross disparity between the estimate and the actual sum claimed to be due, defendant had rendered compliance with the terms of the contract specified impossible or impracticable. These replications the trial court held insufficient upon defendant’s demurrer thereto and dismissed the action upon plaintiff’s refusal to join issue upon the general and special pleas, and plaintff assigns this action as erroneous and prejudicial.
The recovery sought embraces the entire amount due for the work done under the terms of the contract without regard as to whether Grist Brothers Company or the Vaughan Construction Company of West Virginia did it, subject to deduction by the amount of the compensation paid upon monthly estimates made as the work progressed. In other words, plaintiff seeks in this action what plaintiff sought but *662failed to obtain, by tbe cross-bill answer filed in tbe mechanics lien suit of Gist Brothers Company, an adjustment of the account arising out of the construction contract. So far as is now apparent, the accomplishment of that object depends solely upon the right to maintain this action at this time, in view of the express provision of the contract heretofore cited. If that presents an insuperable objection, the ruling assigned to be erroneous is not subject to criticism and must be sustained. This is the sole question to be determined.
There is no dispute and no doubt regarding the right of the parties to specify the conditions upon which an action' upon a contract may or may not be maintained without compliance with the conditions imposed by it and agreed to by them. Such provisions are not unusual and as a general rule courts uphold them. But though they are common and upheld, the rule sustaining them is not inexorable. It obtains and is enforceable only when the final estimate of the engineer is fair, just and commensurate with the work done and performed under the contract. If the estimate is unfair and not reasonably commensurate with the work done and performed, and unjustly fails to report a correct balance due to the contractor, he is not bound to comply with the strict letter of the contract, where to do so would necessitate the assumption of grievous burdens and subject him to risk of imperiling his entire claim. Such danger obviously appears in this case. For if plaintiff be required to pay Gist Brothers Company 'the full amount of their mechanics lien as a condition precedent to its right to maintain this action upon the contract, and the proof should show the justness and fairness of the engineer’s final estimate, the plaintiff would lose the difference between the two amounts, or $68,295.46, a loss wholly disproportionate to the amount certified to be the balance due upon the contract, which paintiff claims is so far inadequate as to constitute actual or constructive fraud on the part of the engineer.
The general rule, as Ave have said, is that where a contract requires payments for labor and materials entering into the .performance of the work agreed upon by the parties thereto to be based upon estimates made by an architect, in the case *663of a building contract, or by an engineer, in a railroad construction contract, such estimates ordinarily are conclusive upon both contracting parties. However, there is the same uniformity of agreement among the authorities that to. be conclusive the estimates must be free of fraud and bad faith. If fraudulent or so far inaccurate as to amount to fraud or bad faith, they do not bind either contracting party. The-exception to the rule is sustained with the same unanimity as the rule itself; indeed all the authorities discussing the-effect of provisions regarding estimates say that “the certificate, estimate, determination or decision of an architect, engineer or other person may be impeached for fraud or such-gross mistake as would imply bad faith or a failure to exercise an honest judgment.” 9 C. J. sec. 117 (3), p. 776; Parr v. Howell, 74 W. Va. 413. Especially is this observance-of the legal requirement essential where the power of one of' the parties over the contract is complete. Where the agent’s-, decision is conclusive, a corresponding duty exists that the-agent’s duty should be exercised reasonably and with due regard to the rights of both parties; and if, as alleged in the special replications, found insufficient in this ease, the agent’s decision was a gross mistake or made in bad faith, the contractor is entitled to recover damages actually sustained by him by reason thereof. Ripley v. U. S., 223 U. S. 695; Berry v. Masonic Temple Ass’n, 80 W. Va. 342. In the Berry ease cited the court said: “In those instances in which he (the architect) acts as arbiter, he acts for and binds both” the owner and builder, “if his decisions are not for any reason impeachable.” See also Johnson v. Bunn, 114 Va. 222. The burden of such impeachment devolves upon the plaintiff. Parr v. Howell, cited; Berry v. Temple Ass’n, cited. Clearly, therefore, the plaintiff is not bound by the certificate of the engineer in charge of the construction work done by the plaintiff for the defendant railway company, nor precluded from maintaining and prosecuting this action to final determination if the estimate be impeachable for fraud or gross error of judgment, unless other provisions of the contract prevent or forbid the prosecution of the action.
The only provision which could produce that result is the *664one that requires plaintiff to secure, when requested, releases of all claims that are or may become liens on 6r charges against the property of the defendant growing out of the performance of the work under the terms of the contract. The burden and risk involved in attempting to comply with this requirement in the circumstances detailed we have referred to already in another connection. Pertinent to this question is the statement of Judge Moncure in Balto. & Ohio R. R. Co. v. Polly, Woods & Co., 14 Gratt. 447, 467: “The making of final estimates and giving releases for the amount due thereon were both conditions precedent, but the latter is dependent on the former. If there were no estimates, there could have been no releases; and fraudulent estimates were as none at all in this respect. If the fact that the final estimates made out -were fraudulent excused the plaintiff from using any exertions to procure any other, a fortiori it excused them from giving or offering to give releases.” The same thing is said in Norfolk & Western R. R. Co. v. Mills, 91 Va. 613, involving a contract of like import, and saying: “If the conduct of such engineer was fraudulent or if he was guilty of a mistake so gross as to amount to a fraud on the rights of the opposing party, the latter is not bound by such estimate and need not tender such releases, but may maintain his action on the contract to recover the true amount due him.” See also Mills v. Norfolk & Western R. R. Co., 90 Va. 523, 531-2.
There are some, though we think not such material or significant differences between the facts of this case and those cited as forbids the application of the same legal principle. They vary only in this that in the cited eases there appears not to have been involved directly the rights of a subcontractor who had converted his claim for compensation into a lien created under the mechanics lien statute and binding upon the property of the owner. It is not perceived wherein this fact alters the relation of the contracting parties as to the principal liability. The only perceivable effect is to render their situation, as here, slightly more intricate and complicated, and certainly some intricacy and complication may arise as a result of the pendency of the two proceedings at *665the same timé in the courts of different counties and circuits. And it is not inconceivable, indeed, it is probable, that such decree as may be entered in Gist Brothers Company’s suit will vary materially from the recovery in this action, if plaintiff succeeds upon the trial, and may also result in two encumbrances against defendant’s property predicated upon the same debt or liability. These conditions or circumstances, however, are not wholly irremediable; but it is not within the province or power of this 'court at this time or in this case to point out the specific remedy, except to say that there is some forum to which application may be made to prevent collection of the same debt twice.
These conclusions require the reversal of the judgment, the overruling of the demurrer to the two special replications and the remand of the case for further proceedings.
Reversed, demurrer overruled, remanded.