Facebook is again facing charges of housing discrimination because of its ad-targeting system, this time by the U.S. Department of Housing and Urban Development.

The claim Thursday from HUD comes less than a week after Facebook said it would overhaul its ad-targeting systems to prevent discrimination in housing , credit and employment ads as part of a legal settlement with a group that includes the American Civil Liberties Union, the National Fair Housing Alliance and others.

HUD Secretary Ben Carson said Thursday that there is little difference between the potential for discrimination in Facebook’s technology, and discrimination that has taken place for years.

“Facebook is discriminating against people based upon who they are and where they live,” Carson said. “Using a computer to limit a person’s housing choices can be just as discriminatory as slamming a door in someone’s face.”

In a statement, Facebook expressed surprise over the charges, saying it has been working with HUD to address its concerns and has taken steps to prevent discrimination, including eliminating thousands of targeting options last year that could be misused by advertisers.

“We’re disappointed by today’s developments, but we’ll continue working with civil rights experts on these issues,” the company said.

Facebook is wrestling with several government investigations in the U.S. and Europe over its data and privacy practices. The company’s advertising methods generate most of its profit because its highly valued by advertisers who can get their message to the exact crowd it desires.

HUD claims Facebook’s ad platform is “encouraging, enabling, and causing housing discrimination” because it allows advertisers to exclude people who they don’t want to see their ads. The agency said Facebook technology illegally restricts who can view housing-related ads on its platforms and across the internet. It also claims Facebook gathers extensive data about its users and then uses that data to determine which users view housing-related ads.

In $5M settlement, Facebook to revamp ad-targeting systems to prevent discrimination

HUD claims Facebook allowed advertisers to exclude people based on their neighborhood and gave advertisers the option of showing ads only to men or only to women.

In last week’s settlement, the changes to Facebook’s advertising methods —which generate most of the company’s enormous profits — were unprecedented. The social network says it will no longer allow housing, employment or credit ads that target people by age, gender or zip code. Facebook will also limit other targeting options so these ads don’t exclude people on the basis of race, ethnicity and other legally protected categories in the U.S., including national origin and sexual orientation.

The social media company is also paying about $5 million to cover plaintiffs’ legal fees and other costs.

Facebook and the plaintiffs — a group including the American Civil Liberties Union, the National Fair Housing Alliance and others —called the settlement “historic.” It took 18 months to hammer out. The company still faces an administrative complaint filed by U.S. Department of Housing and Urban Development in August over the housing ads issue.

Charges of discrimination haven’t been Facebook’s only problem with its highly valued ad targeting. It’s taken fire for allowing advertisers to target groups of people identified as “Jew-haters” and Nazi sympathizers. It’s also still dealing with fallout from the 2016 election, when, among other things, Facebook allowed fake Russian accounts to buy ads targeting U.S. users to inflame political divisions.

Facebook pivots to privacy, but can Zuckerberg make the strategy work?