President Obama called on Congress to close a tax loophole that allows American firms to avoid federal taxes by using a different country as their official address while still primarily operating in the U.S.

The president, who wrapped up his three-day tour of the West Coast on Thursday, told CNBC that companies thrive in the United States because of its infrastructure, universities and a “whole range of benefits.” Avoiding taxation is “neither for or good for the country over the long term,” and it’s simply “gaming the system,” argued Obama.

The commander-in-chief is expected to discuss the initiative at a technical college in Los Angeles later in the day and will argue that companies using so-called tax inversions hurt the middle class.

Obama also weighed in on the Federal Aviation Administration lifting its ban Wednesday night on U.S. airlines flying into and out of Ben Gurion International Airport in Tel Aviv, Israel. The ban was put into place after a rocket fired from Gaza exploded near the airport on Tuesday.

The president was asked by CNBC’s Steve Liesman whether it’s safe for Americans to fly to Israel.

Obama said, “The initial ban that was imposed by the FAA was based on Israel needing to show us that in fact it was safe for commercial airlines to fly in. They worked through a checklist of concerns and mitigation measures that needed to be taken … In light of some scary moments a couple of days ago, the FAA took some prudent action. But it also engaged with Israel, and Israel was able to answer those questions.”