
945 So.2d 627 (2006)
Jason THOMPSON, Appellant,
v.
STATE of Florida, Appellee.
No. 4D06-4196.
District Court of Appeal of Florida, Fourth District.
December 27, 2006.
*628 Jason Thompson, Indiantown, pro se.
No appearance required for appellee.
PER CURIAM.
The appellant, pursuant to rule 3.800(a), challenges the sentence imposed after the lower court revoked his youthful offender probation. The judge determined that Thompson committed the crime of possession of cannabis, which the judge found to be a substantial violation of probation, and sentenced Thompson to an eleven-year prison term. Thompson claims the judge violated the principles announced in Apprendi v. New Jersey, 530 U.S. 466, 120 S.Ct. 2348, 147 L.Ed.2d 435 (2000), because the judge increased his sentence beyond the six-year limit for violations of youthful offender probation, as described in section 958.14, Florida Statutes, by making findings of fact as to the nature of the violation. We disagree and affirm.
Thompson's argument that his sentence is illegal misconstrues both section 958.14 and Apprendi. Section 958.14 restricts a court to a sentence of six years in prison "for a technical or nonsubstantive violation" of the youthful offender probation. However, where the violation is a substantive violation, the punishment cannot be "longer than the maximum sentence for the offense for which he or she was found guilty, with credit for time served while incarcerated." § 958.14, Fla. Stat. In essence, there is a six-year cap for technical violations of a youthful offender probation sanction, but no such cap if the defendant committed a substantive violation.
In this case, the lower court concluded Thompson substantively violated his probation by committing the crime of possession of cannabis, as evidenced by a positive drug test. This legal conclusion is supported by precedent. See Henderson v. State, 720 So.2d 1121, 1123 (Fla. 4th DCA 1998) (suggesting "testing positive for marijuana may qualify as a substantive violation") (citing Robinson v. State, 702 So.2d 1346 (Fla. 5th DCA 1997)); see also Buckins v. State, 789 So.2d 1184, 1185 (Fla. 4th DCA 2001) (noting a defendant who tested positive for cocaine substantially and willfully violated the conditions of his probation). Because the lower court found a substantive violation, the court was not bound by the six-year cap found in section 958.14.
Further, Apprendi does not apply in this case. There, the supreme court held: "Other than the fact of a prior conviction, any fact that increases the penalty for a crime beyond the prescribed statutory maximum must be submitted to a jury, and proved beyond a reasonable doubt." 530 U.S. at 490, 120 S.Ct. 2348 (emphasis added). The key term is "fact," as the jury is not entitled to make legal determinations; questions of law are within the exclusive province of the court. In this case, Thompson incorrectly argues that the determination that the violation is technical or substantive is a "finding of fact" as *629 understood from Apprendi. It is not a "finding of fact" but instead a legal determination. Thus, the lower court did not violate Thompson's due process rights as described in Apprendi.
The lower court dismissed Thompson's motion, instead of denying it on the merits, possibly believing the issue had been raised and rejected on direct appeal and in a prior petition for writ of habeas corpus. We believe the issue presented in the instant motion was sufficiently distinct from the prior pleadings to allow for consideration on the merits. However, as described above, from the face of the record and the applicable law, Thompson is not entitled to the relief he seeks. Thus, the lower court should have denied relief on the merits and not dismissed the case as procedurally barred. Remand for such an order would be a waste of judicial resources and thus we choose to affirm on the merits. See generally Richardson v. State, 918 So.2d 999 (Fla. 5th DCA 2006) (refusing to remand for the entry of an order changing the disposition from denial to dismissal).
WARNER, SHAHOOD and TAYLOR, JJ., concur.
