The Trump administration put a stop this week to an Obama-era rule that would have hurt the wage and employment prospects of all workers, and would have harmed women and minorities the most.

The rule would have required companies with 100 or more workers to report detailed salary information to government bureaucrats by sex, race, job category, and other factors.

As innocuous as additional reporting requirements may sound, the way in which the Department of Labor and lawyers would have used this information would have backfired on those workers that were the policies’ targets.

The purported goal of the rule was to close the widely misinterpreted gender wage gap and empower workers to identify and sue their employers for alleged discrimination in pay and promotions.

The Department of Labor was planning to use information obtained in response to the ruling to police employers who raised red flags in the agency’s data files for an unequal distribution in their employment and pay scales based on gender and race.

At the time the rule was proposed in January 2016, then-Chairwoman of the Equal Employment Opportunity Commission Jenny Yang explained to The New York Times: “We will be using the information that we’re collecting as one piece of information that can inform our investigations [against employers].”

Large government contractors are already subject to the rules, giving us a glimpse of what other employers could expect if the rule was allowed to go into effect. The Department of Labor has sued several tech companies, including giants like Google and Oracle, for alleged gender discrimination in pay.

Pay disparities reflect a wide number of variables that aren’t easily captured in overly simplistic government statistics. The gender pay gap is the most blatant example of drawing false conclusions from incomplete data.

When accounting for measurable, relevant factors, the statistical pay gap between men and women all but disappears. And because current research has limitations in what factors are included, any remaining gap should not simply be interpreted as reflecting discrimination.

Women have shown a strong preference for in-kind benefits over cash wages in polls, for example, which is not included in studies that explore the reasons for the gender wage gap.

According to a Department of Labor study, differences in education, experience, choice of industry and occupation, career interruptions, and hours worked explain all but 5 cents of the so-called wage gap. Immeasurable components of compensation—such as flexible work schedules—likely account for the remaining gap.

Policies like this Obama-era rule for more data collection are introduced as well-intended measures to help women—especially minority women for whom the so-called wage gap is greater—obtain equal pay for equal work.

What’s more important than good intentions are actual outcomes, and that’s where measures like this rule fail. Instead of helping, this measure would have dimmed the job and wage prospects of all workers, and especially of those workers the policy sought to help in the first place.

Employers who are weary of costly discrimination lawsuits against them react most effectively to such a rule by adopting more rigid pay structures.

To the detriment of workers, the best way to protect against unfounded discrimination claims based on incomplete data is to have one-size-fits-all pay structures that fit neatly into the boxes on government reporting forms.

The problem is that this reduces the availability of flexible work arrangements, which are especially important to working parents. It also leads to less performance-based pay, like bonuses, which encourage and reward excellence.

Boxes on government forms simply can’t capture sufficient data to explain differences in wages and promotions based on employee behavior and preferences. The result is less flexibility and more rigidity in the workplace.

Differentiated pay is a crucial mechanism for attracting and retaining qualified employees. Rigid pay structures distort the labor market, reducing economic growth and job and wage prospects for many workers.

The president’s daughter, Ivanka Trump, has shown through both her actions and words that she is deeply concerned about women’s equality in the workplace. After consulting with experts, she ultimately stepped back from this policy because “it would not yield the intended results.”

Other advocates for women could learn a lot from Ivanka in this respect. We should all be concerned about ensuring equal opportunity for women and men, regardless of race.

Let’s make sure we don’t do more harm with well-intended policies that yield unintended outcomes.