U.S. Supreme Court justices are voluntarily moving away from potential conflicts by selling shares in public companies.

Their 2018 financial disclosures estimated that Chief Justice John Roberts sold up to $250,000 of AT&T stock after the court turned away a case that involved the company. A court watchdog said he should have recused himself due to his holding.

Roberts’ sale is part of a larger trend that’s seen the justice reduce their portfolios of individual stocks over the past couple of terms.

The three justices who own individual stocks—Roberts, Stephen Breyer and Samuel Alito—reduced their combined holdings to 40 companies in 2018 compared to 73 in 2014, said Supreme Court watchdog Fix the Court.

Although the financial disclosures made public June 14 don’t reveal exact pricing, estimates show Roberts, Breyer, and Alito reduced their combined portfolios by as much as $300,000 in 2018.

The move is voluntary in that there is no law or code of conduct discouraging stock ownership for Supreme Court justices, like there is for members of Congress and the executive branch.

The justices have argued that such a law would be unconstitutional, as it would encroach on the independence of the judiciary.

Voluntary or not, the move is step in the right direction, according to ethics advocates.

Individual stock ownership can create financial conflicts that reduce the number of justices available to hear a given case, said judicial ethics expert Steven Lubet, of Northwestern School of Law.

Given that Supreme Court justices can’t be temporarily replaced when they recuse themselves—setting up the possibility that the court will split 4-4 on an issue—it’s always better to have a full complement, Lubet said.

Just last term, stock ownership caused Roberts, Breyer, and Alito to recuse themselves in more than three dozen of the thousands of cases that the justices are asked to review, according to Fix the Court. Breyer and Alito have also missed financial conflicts, including as recently as January.

The move can have broader implications for the institution’s credibility as well.

“In general, a court that refrains from buying and selling securities while deciding cases concerning publicly traded companies is one whose judgments the public will have greater faith in,” said Gabe Roth, who heads Fix the Court.

Roberts, Alito, and Breyer aren’t the only justices who own stock. But the other six hold it in a way that creates fewer potential conflicts.

They “have opted to hold their investments in mutual funds, which will not create a disqualifying interest in the stocks that comprise the funds,” Lubet said.

“That is definitely preferable from the perspective of minimizing recusals,” he said.

In the past, there’s been a push to ban federal judges and justices from owning individual stocks, but it’s unclear if that effort will be renewed in Congress, Roth said.

“Overall, there are two ways to make the Supreme Court more open and accountable: the justices themselves could choose to do things like sell their stocks” or “Congress could compel them to,” Roth said.