The U.S. banking bailout during the financial crisis will be a sore spot for taxpayers for a quarter century, JPMorgan Chase & Co.’s Jamie Dimon said.

“It’s going to be 25 years before banks are forgiven for what happened,” the chief executive officer of the biggest U.S. bank said Monday at a event sponsored by the World Affairs Council in Philadelphia. Still, the government “did the right thing” to avoid a disaster, Dimon said, adding that the economy was facing the risk of another Great Depression.

In a wide-ranging discussion, Dimon also said the U.S. needs proper border security and immigration reforms. He said President Donald Trump is right about trade issues he’s been raising with China, but wrong in using tariffs to address the problem.

Dimon’s comments about the U.S. president come about two weeks after the CEO boasted that he could beat Trump in an election and that he was smarter as well. He later backtracked and said he shouldn’t have made the remarks.