President Donald Trump’s top economic advisor, Gary Cohn, swiped papers from his boss’s desk to keep the president from ordering an exit from the North American Free Trade Agreement and a trade deal with South Korea, according to a Washington Post report based on a new book by Bob Woodward.

Cohn, who Trump sometimes called “globalist Gary,” told an associate that he removed a letter the president was intending to sign withdrawing from a trade agreement with South Korea, according to the Washington Post’s report on Woodward’s new book.

Cohn was tapped by the president as head of the National Economic Council. Prior to that Cohn had been the second highest executive at the Wall Street investment bank Goldman Sachs. Cohn resigned this spring after the president announced new tariffs on steel and aluminum. He was replaced by Larry Kudlow.

That was not the only time Cohn and other White House aides undermined the president’s agenda.

When Trump became dissatisfied with the pace of progress on NAFTA, he ordered staff secretary Rob Porter to draft letter ordering an exit from the deal.

“Why aren’t we getting this done? Do your job. It’s tap, tap, tap. You’re just tapping me along. I want to do this,” the Woodward book quotes Trump as saying.

Porter drafted the letter but consulted with “other advisers” on how to prevent the exit, according to Woodward’s book. The staffers worried that a U.S. withdrawal from the trade pact would trigger an economic and foreign relations crisis.

Cohn came up with the solution.

“I can stop this. I’ll just take the paper off his desk,” Cohn told Porter, according to the book.

In August, President Trump announced that the U.S. was planning to end NAFTA and replace it with a new trade agreement. Mexico has agreed to the new agreement but negotiations with Canada are ongoing. Trump has said if Canada does not join the new trade pact, he will move ahead with a bilateral agreement with Mexico only.