Editor’s Note: This story has been updated throughout.

Twitter said it fixed its advertising platform that allowed prospective marketers to target millions of users interested in derogatory words such as “n**ger” and “wetback.”

The Daily Beast reported Friday that Twitter Ads returned 26.3 million users who may respond to the term “wetback,” 18.6 million to “Nazi,” and 14.5 million to “n**ger.”

"We determined these few campaigns were able to go through because of a bug that we have now fixed,” a Twitter spokesperson said Saturday after The Daily Beast’s original report. “Twitter prohibits and prevents any ad campaigns involving offensive or inappropriate content, and we will continue to strongly enforce our policies.”

After our original investigation, The Daily Beast tried running some of the same ad campaigns targeting hateful terms, but they gained zero impressions.

On Friday, Twitter said the keywords The Daily Beast targeted in its investigation “have been blacklisted for several years” and said “we are looking into why the campaigns … were able to run for a very short period of time.”

In its advertising policy, Twitter says it prohibits "the promotion of hate speech globally." It says its ad policy includes race, ethnicity, and national origin, and tells marketers: "You are responsible for all your promoted content on Twitter."

The investigation revealed Twitter allowed prospective customers to target many more users who may have responded to hateful advertisements than Facebook. Facebook permitted advertisers to target an audience of under 2,300 people interested in anti-Semitic phrases such as “How to burn jews,” ProPublica reported Thursday.

Twitter’s ad platform let customers choose what it calls “audience features” when creating an advertising campaign, allowing them to target any keyword. Type in “Nazi,” for example, and the platform says in bold lettering that there are 18.6 million users who may respond to that keyword. Twitter does not always reveal the audience size, particularly for terms with two or more words.

The feature also suggests what it calls “follower look-alike” accounts, explaining: “Target people with interests similar to an account's followers. For example, enter @TwitterAds to target people likely to be interested in advertising on Twitter.” Type in the keyword “Hitler,” and Twitter Ads suggested we target people with interests similar to accounts with handles including @AdolfHiitler_.

This feature appears to be an automated process.

“Keyword targeting allows you to reach Twitter users based on keywords in their search queries, recent Tweets, and Tweets they recently engaged with,” Twitter’s help page said, adding: “Because you can reach people for whom your message will be most relevant and top of mind, this targeting option puts you in a better position to drive engagements and as well as leads and conversions.”