Defense Secretary Jim Mattis told House lawmakers on Thursday the Iran nuclear deal “needs to be fixed,” and he's uncertain whether it could still be saved.

Mattis had testified before that Iran was in compliance, and it was in the U.S.' national security interest to remain in the Joint Comprehensive Plan of Action, which President Trump has criticized as one of the worst deals in history.

Now, both the secretary and the chairman of the Joint Chiefs of Staff, who called the deal “insufficient” on Thursday, appear to be on the same page as Trump as a May deadline approaches for reaffirming the deal.

“I think it needs to be fixed,” Mattis told the House Armed Services Committee.

He said the administration is working with the European allies who are signatories on three areas that are considered to be needed fixes to the 2015 agreement, which was spearheaded by the Obama administration to head off Tehran’s efforts to obtain nuclear weapons. Mattis declined to say what the three areas are, saying it was "pre-decisional."

“If those three areas can be addressed, then perhaps it can be saved,” Mattis said. “If we can fix most of it, will that be sufficient? I don’t know right now.”

Trump is set to decide May 12 on continuing sanctions relief for Iran, which U.S. officials have said appears to be complying with the terms of the deal.

The decision could lead the agreement to unravel. But the Trump administration wants to clamp down on a wide array of other destabilizing activity by Iran in the Middle East and around the world.

“We have a piece right now that addresses the nuclear threats; it’s been deemed to be unsatisfactory,” Gen. Joseph Dunford, the Joint Chiefs chairman, told the House committee.

Dunford said he believes Iran remains compliant to the nuclear deal but told lawmakers, “I can’t share that with you right now” when asked what he will recommend to Trump.

“I think from my perspective we want to make sure all of Iran’s malign activity is addressed — nuclear activity, cyber activity, missile activity, maritime threats,” he said.