Google has decided to revamp its advertising policy after facing criticism for ads showing up next to offensive content, some related to hate speech. The company released a statement on Friday announcing its plan to give more power to advertisers to choose where their ads will be placed. The move came after several advertisers, including the United Kingdom government, pulled out amid concerns about the placement of their products.

Ronan Harris, the company’s managing director in the UK, said Google had removed around 2 billion offensive ads and blacklisted 1,00,000 publishers in 2016 alone. “We don’t always get it right,” he said in a blog post. “We recognise the need to have strict policies that define where Google ads should appear.”

An investigative report by The Times had revealed that the company placed ads by several publishers next to controversial content without permission. These include ads by the UK government, many by media outlets such as The Guardian, BBC and Channel 4 and several by major brands of the like Argos and L’Oréal. The company was also pulled up by the British government after the report surfaced.

”Google is responsible for ensuring the high standards applied to government advertising are adhered to and that adverts do not appear alongside inappropriate content,” the UK government told Bloomberg in an emailed statement. “We have placed a temporary restriction on our YouTube advertising pending reassurances from Google that government messages can be delivered in a safe and appropriate way.”

British newspaper The Guardian had also said that it would withdraw ads from the platform unless the company assured it that the placement of ads would be more mindful in the future.

On Tuesday, Germany said that it would impose a fine of EUR 50 million (around Rs 346 crore) against erring social network sites who fail to provide options to its users to flag hate speech and fake news.