ON MOTION FOR REHEARING OR FOR WRITTEN OPINION
PER CURIAM.We deny the appellant’s motion for rehearing, but grant his motion for written opinion, withdraw our per curiam affir-mance issued on April 26, 2017, and substitute the following opinion in its place.
We affirm the defendant’s convictions and sentences for aggravated battery, see Boyd v. State, 910 So.2d 167 (Fla. 2005), but remand the cause to the trial court for the sole purpose of entering a written competency order nunc pro tunc. See Fla. R. Crim. P. 3.212(b); Mullens v. State, 197 So.3d 16 (Fla. 2016); Dougherty v. State, 149 So.3d 672 (Fla. 2014).
Affirmed and remanded with directions.