In what is being described as an unexpected victory for Bernie Sanders supporters, the Democratic Party is officially speaking up in favor of removing marijuana from the list of Class 1 controlled substances and providing a “reasoned pathway” to legalization. It marked a reversal from a few days earlier, when the party’s platform drafting committee had adopted a more moderate stance on marijuana, reports the Washington Post.

On Saturday afternoon, the committee first discussed an amendment to remove marijuana from the Controlled Substances Act. But some worried that would have hurt state efforts to study the legalization of marijuana. So then committee members agreed to switch out the language with another amendment that called for the downgrading of marijuana.

The full text of the amendment now reads:

Because of conflicting laws concerning marijuana, both on the federal and state levels, we encourage the federal government to remove marijuana from its list as a Class 1 Federal Controlled Substance, providing a reasoned pathway for future legalization.

Despite this victory, supporters of Sanders were largely frustrated by numerous defeats in the discussions over the platform, reports the Orlando Sentinel. Although the committee approved an amendment to formalize a commitment to reaching a $15 minimum wage, the platform won’t include language opposing the Trans-Pacific Partnership. Instead of specifically condemning TPP, the platform will note the party opposes “trade agreements that do not support good American jobs.”