In its latest move designed to prevent discriminatory ad targeting, Facebook is removing thousands of options that could show bias against different religions, races and cultures.

On Tuesday, Facebook said it would discontinue 5,000 terms that could target people interested in Passover, Evangelicalism, Native American culture, Islamic culture, Buddhism, and much more, according to a blog post from the social network.

While Facebook does not categorize people by their race or ethnicity, advertisers could target people "interested in" certain cultures. For instance, a person "interested in Passover" could be Jewish. A bad actor could use such targeting options to discriminate against Jewish people by not showing them ads for housing, jobs and educational opportunities.

Legitimate advertisers typically exclude certain segments from seeing their campaigns to avoid serving ads to unnecessary or redundant audiences, but the option could also be used by bad actors to discriminate.

"While these options have been used in legitimate ways to reach people interested in a certain product or service, we think minimizing the risk of abuse is more important," the blog post read. "This includes limiting the ability for advertisers to exclude audiences that relate to attributes such as ethnicity or religion."

Facebook would not say how many targeting options it has in total or name all 5,000 terms being discontinued.

Facebook has been working on fixing ad targeting for nearly two years now, since Pro Publica reported on the potential to exclude minorities and other underserved groups in housing and employment ads.

A year ago, Pro Publica uncovered other disturbing possibilities, like the ability to target ads on Facebook to people who said, for instance, that they were "Jew haters." The anti-Semitic terms had been manually entered by users of the social network and were able to be surfaced through the automated ad platform.

Still, just last week the federal Department of Housing and Urban Development criticized Facebook over ad targeting tools that it says could still have let landlords and real estate companies discriminate.

Facebook said the latest changes were not related to the Housing and Urban Development complaint. "We've been building these tools for a long time and collecting input from different outside groups," a Facebook spokesman said by email.