Gov. Andrew Cuomo says he remains concerned of the potential pitfalls of a program that would legalize medical marijuana as negotiations continue on the legislation.

At a news conference with legislative leaders to unveil an agreement on heroin abuse legislation, Cuomo said he was worried of the “downside” of a program not implemented properly.

“There are some situations where there’s very high upside and very high downside,” Cuomo said. :Medical marijuana when you do it right you can help people who are in terrible, desperate situations.”

But he added creating a broad system could lead to unforeseen consequences.

“However, if the system doesn’t work you can have a public safety debacle if it doesn’t work,” Cuomo said.

The governor remains opposed to a program that would allow patients to smoke marijuana.

State lawmakers earlier this week amended the legislation known as the Compassionate Care Act that would ban smoking of marijuana by patients in public, removed lupus and diabetes from the list of prescribed illnesses and vested more power in the state Department of Health commissioner in creating a program.

Cuomo added “billions” are spent trying to fight drug abuse in society, and he didn’t want to contribute to the problem.

“If we do this wrong and the marijuana that was supposed to go to the right person goes to wrong person then we’ve made the situation worse,” Cuomo said

Cuomo’s comments come as protestors demonstrate outside of his second-floor office suite at the state Capitol.

Two advocates of medical marijuana entered Cuomo’s news conference on the heroin legislation with a wheelchair-bound child. The advocates did not make any noise at the conference and left after a few minutes.

The legislative session is due to conclude Thursday, and Cuomo has said he would issue a message of necessity if a deal is reached on the bill.

Lawmakers have opened the door to staying through Friday.