Senate Foreign Relations Committee Chairman Sen. Bob Corker, R-Tenn., center, and ranking member Sen. Robert Menendez, D-N.J., right, are two of the six senators who introduced a bipartisan bill Thursday to hold Iran accountable for its actions.

Republican Sen. Bob Corker of Tennessee is criticizing the House speaker for saying the president shouldn't work with Democrats on health care.

Corker tweeted Thursday, "We have come a long way in our country when the speaker of one party urges a president NOT to work with the other party to solve a problem."

Corker was referring to comments Paul Ryan made to CBS warning against the idea of Donald Trump working with Democrats if Republicans can't revive their health care legislation.

Ryan told "CBS This Morning" that if Trump works with Democrats, they will "try and change Obamacare and that's not, that's hardly a conservative thing."

In an interview, Corker said: "It's not the kind of thing the leader, speaker of the House should be saying."

Ryan insists he's still trying to get the bill passed despite its collapse last week short of votes. The legislation was supposed to make good on seven years of GOP promises to repeal and replace President Barack Obama's health law.

Ryan said he understands and shares President Donald Trump's frustration with the House Freedom Caucus.

Trump attacked the group of conservative lawmakers over Twitter Thursday, saying they "will hurt the entire Republican agenda" and "we must fight them."

Opposition from the Freedom Caucus helped sink major health care legislation in the House.

Ryan told journalists: "It's very understandable the president is frustrated we haven't gotten to where we need to go, because this is something we all said we would do."

The Wisconsin Republican said he is pushing lawmakers to keep talking and try to reach a consensus on a health bill that could pass -- but he declined to commit to another vote, saying he does not want to impose an "artificial timeline."