In State v. Courtney, the NJ Supreme Court held that, where the defendant avoids a mandatory extended-term sentence under N.J.S.A. 2C:35-12, the sentencing court cannot undercut the agreed-upon sentence. Here, the defendant claimed that, since the prosecutor had not filed a motion seeking an extended-term sentence, Section 12 was not implicated and the trial judge could still honor his request to undercut the plea deal. The Supreme Court found that argument to be form over substance and rejected it.