President Donald Trump praised Department of Homeland Security Secretary Kirstjen Nielsen for doing a “good job” in her position after reports that he privately berated her for failing to control the influx of illegal immigrants on the southern border.

“You’re doing a good job, and it’s not an easy job,” Trump said to Nielsen during an immigration roundtable with California officials at the White House. “I know what you’re going through right now with families is very tough, but those are the bad laws that the Democrats gave us.”

Trump said that Democrats were making it more difficult to enforce the border, blaming the weak laws for leading to tough practices like breaking up families of illegal immigrants crossing the border.

“We have to break up families, the Democrats gave us that law. It’s a horrible thing that we have to break up families,” Trump said.

Nielsen was reportedly close to resigning after Trump berated her at a cabinet meeting last week for failing to secure the border, according to a New York Times report. Nielson denied that she threatened to resign.

White House chief of staff Gen. John Kelly said that he called Nielsen after the meeting to urge her to continue in her position.