The Swiss government has been at pains to implement restrictions on European Union newcomers decided upon in a 2014 referendum without annulling an economically important set of treaties with the 28-country bloc. Although Switzerland isn’t a member, citizens of EU states can work and reside in the country without special permission. About a quarter of Switzerland’s inhabitants aren’t nationals.

“We are discussing with Switzerland, we have Britain in mind, because these questions are interlinked,” Juncker said on Monday, adding that a solution would be a “Swiss-specific arrangement.” He did not elaborate on what such a solution might be.

“I’m more optimistic than I was in the past weeks — it’s all moving in the right direction,” Juncker said after speaking with Swiss President and Economy Minister Johann Schneider-Ammann. “We moved closer on some points. That the government wants to privilege Swiss employees on the jobs market is o.k. for me if it takes place in the framework of mutual recognition.”

Britain’s vote in June to leave the EU — in part due to high immigration — has muddied the waters for the Swiss, who in theory must have the curbs in place by February 2017. Analysts — notably former Bank of England policy maker Adam Posen — have pointed out that the EU isn’t inclined to make any concessions for Switzerland as this could set a precedent for Brexit negotiations.

In a speech at the University of Zurich after the Schneider-Ammann meeting, Juncker said that canceling the bilateral treaties wasn’t up for discussion.

Were Switzerland to impose unilateral quotas, that would contravene a set of treaties with the EU covering everything from civil aviation to the free movement of persons, and canceling one element will cause the entire set to be nullified. Officials in Brussels have said the agreements can’t be renegotiated. According to a study for the Swiss government, annulling the pacts could cost the economy an estimated 32 billion francs ($33 billion) a year in potential economic output.

In a bid to stave off a collapse of the treaties that would hurt an economy already burdened by a strong currency, some members of the Swiss parliament are considering a system granting current Swiss residents preference on the job market. That plan — which would abandon the formal quotas required by the plebiscite — is set to be debated in parliament on Wednesday.

When asked whether negotiations were still needed in light of a plan to solve the spat by giving Swiss residence precedence on the jobs market, Juncker said “unanswered questions” remained and also declined to comment upon Swiss domestic politics.

Schneider-Ammann said the conversation with Juncker had been “very constructive” and that while the plan to give current residents preference hadn’t been discussed “in detail,” Juncker understood it well. Another meeting between the two has been scheduled for late October.