A bill that would close a loophole in New York’s criminal procedure law that prohibits jury trials for low-level charges in New York City, but not the rest of the state, cleared a major hurdle this week when it passed the Codes Committee in the state Senate.

The legislation was inspired by last year’s decision by the Court of Appeals in People v. Suazo, which ruled that defendants charged with low-level misdemeanors in New York City should still be afforded a trial by jury if they’re at risk of being deported as a result of their conviction.