Attorney General William Barr sent a memo to the FBI ordering the organization to clear any investigations into 2020 candidates with him.

Barr, 69, on Wednesday, issued restrictions requiring the agency to get his direct approval before launching an investigation into candidates to avoid the debacle that took place in 2016, according to the New York Times.

In 2016, the FBI was accused of influencing then-Democratic nominee Hillary Clinton’s presidential campaign after then-FBI Director James Comey cleared her of criminal wrongdoing in her email scandal but reopened the investigation days before the election.

The agency has also been criticized for its investigation into President Trump, which included obtaining a Foreign Intelligence Surveillance Act warrant to investigate Trump aide Carter Page. An investigation into the FISA process found that the FBI had broken protocol several times while obtaining the warrant, and the Department of Justice has since ruled that two FISA orders into Page were invalid.

Barr’s memo said it was the Justice Department’s duty to ensure elections are “free from improper activity or influences.” As a precaution, he required that all investigations into candidates or campaigns be approved by his office.

“In certain cases, the existence of a federal criminal or counterintelligence investigation, if it becomes known to the public, may have unintended effects on our elections,” Barr wrote, referencing Comey’s decision to make several public announcements about the investigation into Clinton.

He said that the FBI should still respond “swiftly and decisively” to any potential wrongdoing by a campaign but noted that the agency “must be sensitive to safeguarding the department’s reputation for fairness, neutrality and nonpartisanship.”

Barr’s memo required that written notification of any investigation into 2020 candidates or campaign be given to the attorney general’s office and any relevant department so that concerns about foreign security or criminal behaviors are sent to the proper leaders. He is the first attorney general to order that the FBI alert the department about this type of investigation.