#### Louis F. SMITH, Jr., Appellant, v. STATE of Florida, Appellee.

No. 77-2086.

District Court of Appeal of Florida, Second District.

May 17, 1978.

Jack O. Johnson, Public Defender, Bar-tow, and Stephannie L. DaCosta, Asst. Public Defender, Tampa, for appellant.

Robert L. Shevin, Atty. Gen., Tallahassee, and Martha J. Cook, Asst. Atty. Gen., Tampa, for appellee.

PER CURIAM.

Appellant contends that he received an illegal sentence for kidnapping. We agree.

Appellant entered guilty pleas to charges of kidnapping, assault, aggravated battery, and escape. On November 21, 1977, the court adjudged him guilty and sentenced him to prison terms of five years for assault, five years for aggravated battery, life for kidnapping and five years for escape. The first three sentences were to run concurrently with each other but consecutive to the sentence for escape.

At the time the court sentenced appellant, the penalty for kidnapping was life in prison. Section 787.01, Florida Statutes *1165(1977).1 However, the state charged appellant with violating Section 805.01, Florida Statutes (1973), and at the time appellant kidnapped his victim, October 3, 1973, a violation of that section was only a second degree felony carrying a maximum prison term of fifteen years. Section 775.082, Florida Statutes (1973). Therefore, any sentence over fifteen years was excessive because a defendant is subject only to the penalty in effect at the time he committed the offense. *Castle v. State,*330 So.2d 10 (Fla.1976), *aff’g,*305 So.2d 794 (Fla.4th DCA 1974).

While the state concedes that what we have said is true, it contends that appellant may not appeal the excessive sentence since he entered a plea of guilty. We disagree with that conclusion.

Section 924.06, Florida Statutes (1977), which governs a defendant’s right to an appeal, says:

> (1) A defendant may appeal from:

> (a) A final judgment of conviction when probation has not been granted under chapter 948, except as provided in subsection (3);

> (b) An order granting probation under chapter 948;

> (c) An order revoking probation under chapter 948; or

> (d) A sentence, on the ground that it is illegal.

> (2) An appeal of an order granting probation shall proceed in the same manner and have the same effect as an appeal of a judgment of conviction. An appeal of an order revoking probation may review only proceedings after the order of probation. If a judgment of conviction preceded an order of probation, the defendant may appeal from the order or the judgment or both.

> (3) A defendant who pleads guilty or nolo contendere with no express reservation of the right to appeal shall have no right to a direct appeal. Such' a defendant shall obtain review by means of collateral attack.

Reading Subsection (l)(d) and Subsection (3)together, we believe that the legislature did not mean to cut off a defendant’s right to direct appeal from an illegal sentence when he has entered a guilty plea. Rather, we think that Subsection (3) only restricts direct appeals from any error which occurs prior to the acceptance of the plea by the court, or from any error in the acceptance itself.

Accordingly, we vacate the sentence appellant received for kidnapping and remand the case to the trial court for resentencing.

GRIMES, Acting C. J., and SCHEB and DANAHY, JJ., concur.

1

. This section went into effect on July 1, 1975. Ch. 74-383, § 22 and § 67, Laws of Florida.