Christopher Cunningham appeals the denial of his motion to withdraw plea filed pursuant to Florida Rule of Criminal Procedure 3.170(i) and the denial, in part, of his motion to correct a sentencing error filed pursuant to rule 3.800(b). Because Cunningham was entitled , to have counsel assist him at the hearing on the motion to *1151withdraw plea, we reverse and remand for a new hearing on that motion. We affirm the trial court’s order on the motion to correct a sentencing error without prejudice to any right Cunningham may have to challenge the trial court’s imposition of a habitual offender enhancement in a timely filed rule 3.850 motion. See Williams v. State, 821 So.2d 1267, 1268-69 (Fla. 2d DCA 2002).
A motion to withdraw plea pursuant to rule 3.170(Z) is a critical stage of the proceedings at which a defendant is entitled to counsel. Smith v. State, 849 So.2d 485, 486 (Fla. 2d DCA 2003); Meeks v. State, 841 So.2d 648, 648 (Fla. 2d DCA 2003). Cunningham was not represented by counsel at the hearing on his motion to withdraw plea, and the State acknowledged that it had not provided the public defender’s office with notice of the hearing because it believed Cunningham was not represented.
Nothing in the record reflects that Cunningham’s counsel had sought to withdraw from representation or that counsel had been discharged from representation. Although two identical motions titled “DEFENDANT’S PRO SE MOTION TO WITHDRAW PLEAS” were filed on Cunningham’s behalf, the first paragraph of each motion states that the motion is being filed by “[t]he Defendant, CHRISTOPHER CUNNINGHAM, by and through his undersigned counsel.” Also, Cunningham’s counsel, an assistant public defender, signed both motions.1 Because Cunningham’s counsel filed a timely motion to withdraw pleas on Cunningham’s behalf, and because counsel had not been discharged from representation as of the time of the hearing on the motion, we reverse and remand with directions that the trial court appoint counsel to represent Cunningham and conduct a new hearing on the motion to withdraw pleas.
Affirmed in part, reversed in part, and remanded with directions.
CASANUEVA and SALCINES, JJ„ Concur.