CNN  — 

Harvey Weinstein arrived to a court hearing in Manhattan using a walker on Wednesday, an apparent sign of the disgraced movie producer’s deteriorating health.

Weinstein, whose sexual assault trial is set to start next month, is scheduled to undergo back surgery on Thursday to relieve back pain, his attorney Donna Rotunno said in court. After the court hearing, she said the legal team insisted he use a walker.

“We wanted him to use a walker last week and Mr. Weinstein didn’t want the press to think he was seeking sympathy. He is in pain, he’s having surgery, and we will be back in court on January 6 for trial,” she said.

Last week, Rotunno said the public scrutiny on him had taken a toll on his health.

Movie producer Harvey Weinstein arrives at criminal court on Wednesday in New York City.

“This is tough on anybody going through this and dealing with the scrutiny, not only in the court room but the court of public opinion, and this has been hard on him,” she said. “He has some back issues that we’re hoping to address this week, and that’s where his health stands. You can tell, it’s tough on him.”

Wednesday’s court hearing dealt with Weinstein’s bail conditions in light of new bail reforms set to take effect in 2020.

Judge James Burke offered Weinstein three options for bail: $5 million cash bail, a $50 million security bond partially secured at 10%, or a $2 million insurance company bond, each with a 72-hour surety.

Outside court, Weinstein’s attorney Donna Rotunno said Weinstein would take the $2 million insurance company bond, which would be secured with his original $1 million cash bail plus additional assets.

Weinstein must continue to surrender his passport and not apply for a new one, not travel outside the country and notify USAA when he leaves New York or Connecticut, Judge Burke ruled. The judge called the measures the “least restrictive conditions” that would guarantee Weinstein’s return to court of his trial starting January 6.

The judge said that should Weinstein have any further medical issues, the court would “not be terribly understanding.” He asked Weinstein if he understood that if he failed to appear, a warrant would be issued for his arrest.

“I have every intention of being here,” he said, adding that “this is a good thing.” Burke followed up and asked Weinstein to give a yes or no answer, and Weinstein said “yes”.

Manhattan Assistant District Attorney Joan Illuzzi told the court that Weinstein violated his bail conditions by mishandling his ankle monitoring system at times. She said there were 57 violations of Weinstein’s ankle monitor in under two months.

“The people’s position is none of the bracelet violations were accidental,” Illuzi said.

She was “shocked” to find out they were not reported at the time and argued that they were attempts from Weinstein’s to conceal his whereabouts. Illuzzi told the judge that the glitches only stopped once there was a threat of change of bail.

Weinstein’s defense attorney Arthur Aidala said the violations were technical glitches that have to do with lack of reception in the Westchester area where Weinstein resides.

CNN’s Elizabeth Joseph contributed to this report.