Harvey Weinstein agreed to post additional security to ensure he will not flee a criminal sexual assault case brought by New York prosecutors, who had sought to increase his bail after he allegedly failed to wear his electronic ankle monitor.

Prosecutors had sought $5 million bail for the former Hollywood producer rather than the original $1 million, but Justice James Burke of the State Supreme Court in Manhattan agreed to let Weinstein post a $2 million insurance bond.

Weinstein, 67, used a walker to enter the courthouse. His lawyer, Donna Rotunno, said he is expected to have back surgery on Thursday.

A trial is scheduled for January 6, 2020, and Weinstein could face life in prison if convicted on the top counts.

Weinstein has pleaded not guilty to criminal charges that he sexually assaulted two women, one in 2006 and another in 2013.

He has also denied allegations by roughly 70 women of sexual misconduct dating back decades, saying any contact was consensual.

The insurance bond will be insured by Weinstein’s original bail and some other assets, his lawyer said.

In a separate civil case, the New York Times reported Wednesday that Weinstein and the board of his bankrupt film studio have reached a tentative $25 million settlement with dozens of women who accused the former Hollywood producer of sexual misconduct, citing lawyers involved in the negotiations.

The accord would end nearly all civil lawsuits by actresses and former Weinstein employees who accused him of offenses ranging from sexual harassment to rape, the newspaper said.

Insurers for the former Weinstein Co studio would fund the payout, and Weinstein would not be required to admit wrongdoing or to pay anything, the newspaper said.

According to the Times, accusers involved in the tentative accord would make their claims in a bankruptcy court, and the $25 million payout would be part of a $47 million settlement to close out the studio’s obligations.

Representatives for Weinstein declined to comment. The reported settlement drew criticism from Doug Wigdor and Kevin Mintzer, lawyers for two of Weinstein’s accusers. In a joint statement, they said the accord would pay too much to lawyers and too little to victims, and might excuse the studio’s insurers and board from liability to victims who choose not to participate.