
670 So.2d 1113 (1996)
Glenn H. BROWN, Appellant,
v.
STATE of Florida, Appellee.
No. 94-2331.
District Court of Appeal of Florida, Fourth District.
March 27, 1996.
*1114 Richard L. Jorandby, Public Defender, and Karen E. Ehrlich, Assistant Public Defender, West Palm Beach, for appellant.
Robert A. Butterworth, Attorney General, Tallahassee, and Aubin Wade Robinson, Assistant Attorney General, West Palm Beach, for appellee.

ON MOTION FOR REHEARING
PER CURIAM.
We withdraw our previously issued opinion and substitute the following in its place.
We reverse appellant's sentences as an habitual violent felony offender imposed in cases numbered 94-200, 94-440, and 94-476 because the trial court failed to confirm that appellant was personally aware of the possibility and reasonable consequences of habitualization as required by Ashley v. State, 614 So.2d 486 (Fla. 1993). These include (1) the maximum habitual offender term for the charged offenses, (2) the fact that habitualization may affect the possibility of early release through certain programs, and (3) the mandatory minimum term in the case of habitual violent felony offenders. Id. at 490 n. 8. We therefore remand to allow appellant to withdraw his plea or for resentencing in accordance with the plea agreement entered into by appellant, provided that compliance with Ashley is met. State v. Wilson, 658 So.2d 521 (Fla.1995).
We also remand to the trial court for a hearing on appellant's plea in case number 94-440 for the charges of grand theft and dealing in stolen property because at sentencing the trial court failed to inquire into his asserted defense that he did not know that the goods taken were stolen. Where a defendant raises the possibility of a defense to his guilty plea, the trial judge should make an extensive inquiry into the factual basis before accepting the plea to prevent manifest injustice from occurring. State v. Kendrick, 336 So.2d 353, 355 (Fla. 1976). In accordance with Kendrick and State v. Lyles, 316 So.2d 277 (Fla.1975), we remand for further inquiry by the trial court "(a) to make inquiry of the defendant and his counsel concerning their discussions relative to the defenses to the charge; (b) to receive *1115 evidence of a factual basis for the plea; and (c) to allow the defendant an opportunity to present evidence on his own behalf how, if at all, manifest injustice occurred." Id. at 279. After this review, if the trial court finds that a manifest injustice has occurred, then the trial court must allow appellant the opportunity to vacate his plea.
GLICKSTEIN, WARNER and SHAHOOD, JJ., concur.
