After enacting major reforms in telecom, broadcasting, education, labor relations and the governance of public institutions earlier this year, the Mexican Congress is now moving to reform its fiscal and energy laws. The combination is a model of progressive legislating that, in the end, will undoubtedly improve Mexico’s economic competitiveness.

Soon after taking office last year, Mexican President Enrique Peña Nieto initiated the “Pact for Mexico,” an agreement among the three  major political parties to push long-awaited reforms through the Congress. The Pact has fast-tracked legislation, ending years of gridlock and indecision.

The Pact initially raised the specter that the public’s views might never be heard fully. But such concerns were allayed in the Fiscal Code legislation that’s currently moving through the Congress. . Harmful, indeed, ludicrous tax provisions were tempered or outright eliminated from the bill, proving that massive reforms can be repaired and improved even after they’ve been given a green light by party leaders.

One particularly odious provision was the original tax bill’s Anti-Avoidance Clause.  The measure would have allowed authorities to re-characterize for tax purposes transactions that they determined lacked a “business rationale.” This was a highly subjective and potentially abusive criterion that would have permitted government officials to decide, almost at their whim, that a transaction doesn’t have an economic reason for existing (other than tax avoidance) and should therefore be taxed more heavily.

Complaints from the public, however, were heard and heeded by government officials in both the administration and the Congress. A committee in the lower chamber removed the provision. The decision was a victory for common sense and a strong sign that the Pact is a true reform effort and not a mechanism for railroading anti-business provisions into law.

Another disturbing provision in the fiscal bill would have made stockholders liable for taxes owed by companies in which they owned shares. Under the little-noticed provision, stockholders would have been forced to pay taxes levied on but unpaid by the companies in which they participate. A stockholder’s liability would have been based on the percentage that his or her stake represents in the company’s capital stock.

Here, too, reason prevailed. Under the amended bill approved by the lower-chamber’s committee, stockholders would be held liable for taxes only if there was overwhelming and specific evidence of corporate tax evasion. A company would have to be shown intentionally ducking tax payments for any serious consequences to be felt by a company or its owners. Criminal sanctions for run-of-the-mill tax strategies were also taken off the table.

Other issues still need to be addressed as the legislation moves to the Senate. For example, in addition to basic wages, Mexican employers normally provide benefits to employees such as subsidized meals and transportation expenses. Currently those benefits can be deducted by the employer. The initial proposal in the Fiscal Code legislation substantially reduced any deduction for these expenses. That deduction should be restored to as close to 100 percent as possible or the reform proposal should be allowed to phase in over the next few years. Otherwise, employers would be incentivized not to offer those benefits anymore and employees would suffer.

The Fiscal Code legislation could have been an egregious example of governmental overreach. And it still could be unless Congress and the executive branch remain diligent. Having written tax legislation as a member of the U.S. House Ways and Means Committee, I know that even the best-intentioned reform requires close examination to prevent giving the government capricious power.

Foreign investors are closely watching this legislation. While Mexico must enhance tax revenues to improve its social and economic picture, it must also set out the welcome mat for investors who can help build and strengthen its economy. So far, the multi-partisan cooperation has been impressive in achieving these objectives.

Jones is a former U.S. ambassador to Mexico and is chairman & CEO of ManattJones Global Strategies.