NEW YORK (AP) — Facebook is apologizing for letting advertisers use phrases like “Jew-haters” as a targeting criteria and for not noticing it until it was pointed out.

The company is also tightening policies and tools that let businesses target advertisements to its 2 billion users, hoping to ensure that this doesn’t happen again.

The move follows a ProPublica report that found advertisers could use terms such as “how to burn Jews” to target ads to people with those terms in their profile.

Sheryl Sandberg, Facebook’s chief operating officer, wrote in a post on Wednesday that the company “never intended or anticipated this functionality being used this way — and that is on us.”

It hasn’t been a good month for Facebook. The ad-targeting fiasco follows news that the social media giant has unwittingly allowed groups backed by the Russian government to target users with ads. The chairman of the Senate intelligence committee said Tuesday that Facebook should testify as part of its probe into Russian meddling in the US election, the company “seems to have been less than forthcoming” with Congress.

Sandberg said Facebook is taking steps to ensure that material violating its community standards cannot be used to target ads. This includes anything that attacks people on the basis of race, religion, sexual orientation, disability and other categories.

The company says it is also adding more manual oversight to its automated processes — a sign that as much as Facebook wants to rely on artificial intelligence to solve its problems, it is not quite there yet. And Facebook is adding a program to encourage users to report abuse of its advertising systems.

“Seeing those words made me disgusted and disappointed — disgusted by these sentiments and disappointed that our systems allowed this,” Sandberg wrote. “Hate has no place on Facebook — and as a Jew, as a mother, and as a human being, I know the damage that can come from hate.”