
721 So.2d 1177 (1998)
Timothy SCHEBEL, Appellant,
v.
STATE of Florida, Appellee.
No. 97-2879.
District Court of Appeal of Florida, First District.
February 17, 1998.
Timothy Schebel, pro se.
Robert A. Butterworth, Attorney General, Trina Kramer, Assistant Attorney General, Tallahassee, for Appellee.
PER CURIAM.
Schebel appeals the summary denial of his motion for postconviction relief filed pursuant to Florida Rule of Criminal Procedure 3.850. Finding no error as to the first two issues, which were ineffectiveness claims that were either untimely or facially insufficient, we affirm. However, we reverse and remand as to the third issue in which appellant asserted that the trial court erred in summarily denying his motion, because his sentences exceeded the statutory maximum for youthful offenders and the court did not apply the permissible credit for time served and gain time. It appears appropriate to consider this third claim under Florida Rule of Criminal Procedure 3.800(a).
In regard to this point, appellant alleged under oath that when he was sentenced for multiple offenses as a youthful offender in May 1990 to four years of imprisonment followed by three years of probation, such sentences were outside the six-year maximum provided by law under section 958.04, Florida Statutes (1989). He further alleged that when the court revoked his probation[1] for new substantive offenses committed in 1991, it again exceeded the six-year statutory maximum set forth in section 958.14, Florida Statutes (1989), by sentencing him to seven-and-a-half years, and particularly so, he urged, in that he had previously completed the earlier four-year imprisonment term. Another sentence of seven years, imposed on *1178 August 14, 1995, following a later probation violation for a new substantive offense, likewise surpassed the six-year maximum. Additionally, appellant maintained that he was entitled to credit for time served and gain time.
On appeal, the state concedes that at the time appellant committed his initial crimes, the statute authorized resentencing of a youthful offender following a violation of probation to no more than six years, with credit for time served while incarcerated. See § 958.14, Fla. Stat. (1989); Gardner v. State, 656 So.2d 933, 937 (Fla. 1st DCA 1995). Although the statute was subsequently amended to allow for a longer sentence for a substantive probation violation, the state recognizes that the amended statute cannot be applied to appellant, because of the ex post facto prohibition. See § 958.14, Fla. Stat. (Supp.1990); Reeves v. State, 605 So.2d 562 (Fla. 2d DCA 1992). The state notes, however, that the trial court was not limited by the youthful offender act as to the new offenses, but that, based upon the facts alleged by appellant, the case should be remanded to the trial court for attachment of portions of the record which refute his claim.
We are unable to determine from the trial court's order or the record before us whether appellant is entitled to relief, because none of the sentences imposed was attached to the order or included in the record. If, as appellant maintained, he received consecutive youthful offender sentences exceeding six years when he was originally sentenced in May 1990, or when he was resentenced following probation violations in 1991 and 1995, then such sentences would constitute "illegal" sentences, and his motion could be construed as one made pursuant to rule 3.800(a).[2]See Allen v. State, 526 So.2d 69 (Fla.1988) (consecutive sentencing of youthful offenders to more than six years is prohibited); State v. Watts, 558 So.2d 994 (Fla.1990) (court limited to resentence youthful offender upon revocation of probation or community control to no more than six years). And see Davis v. State, 661 So.2d 1193, 1196 (Fla.1995) ("an illegal sentence is one that exceeds the maximum period set forth by law for a particular offense without regard to the guidelines"); State v. Callaway, 658 So.2d 983 (Fla.1995); King v. State, 681 So.2d 1136 (Fla.1996).
If appellant did not receive consecutive youthful offender sentences in excess of six years, but the record shows that the trial court failed to apply the appropriate credit for time served and gain time earned on prior incarcerative terms when it resentenced him on the 1991 and 1995 probation violations, with the result that his youthful offender sentence exceeded the six-year statutory maximum, then appellant's sentence would likewise be illegal and he would be entitled to relief under rule 3.800(a). See § 958.14, Fla. Stat. (1989); Cole v. State, 569 So.2d 882 (Fla. 3d DCA 1990) (on reconsideration) (in resentencing youthful offender after revocation of probation or community control, court must provide credit for time actually served and gain time already allotted by the Department of Corrections during previous imprisonment).
Thus, we agree with the state's concession that the case should be reversed and remanded with directions for the trial court to attach those portions of the record which refute appellant's sworn allegations.
In so doing, we have considered Jefferson v. State, 677 So.2d 29 (Fla. 1st DCA 1996), and Richardson v. State, 698 So.2d 551 (Fla. 1st DCA), cause dismissed, 700 So.2d 687 (Fla.1997), and find them distinguishable in that these cases did not involve the youthful offender statutes and the statutory maximum set forth therein. We also find Chojnowski v. State, 705 So.2d 915 (Fla. 2d DCA 1997), distinguishable, because there was no allegation in that case that the lack of jail credit caused the sentence to exceed the statutory maximum. Nevertheless, we certify the following questions to the Florida Supreme Court as ones of great public importance:

*1179 1. WHETHER CONSECUTIVE SENTENCES EXCEEDING SIX YEARS IMPOSED UPON A DEFENDANT SENTENCED AS A YOUTHFUL OFFENDER UNDER CHAPTER 958, FLORIDA STATUTES (1989), EITHER INITIALLY OR UPON REVOCATION OF PROBATION OR COMMUNITY CONTROL, CONSTITUTE "ILLEGAL" SENTENCES WITHIN THE MEANING OF FLORIDA RULE OF CRIMINAL PROCEDURE 3.800(a), AS THAT TERM HAS BEEN DEFINED IN DAVIS v. STATE, 661 So.2d 1193, 1196 (Fla.1995); STATE v. CALLAWAY, 658 So.2d 983 (Fla.1995); AND KING v. STATE, 681 So.2d 1136 (Fla.1996)?
2. WHETHER A CLAIM THAT A DEFENDANT, WHO HAS BEEN SENTENCED AS A YOUTHFUL OFFENDER, HAS NOT BEEN AFFORDED THE CORRECT AMOUNT OF CREDIT FOR TIME PREVIOUSLY SERVED IN JAIL OR PRISON OR GAIN TIME EARNED FROM PREVIOUS INCARCERATIONS, WITH THE RESULT THAT HIS OR HER SENTENCE EXCEEDS THE STATUTORY MAXIMUM FOR YOUTHFUL OFFENDERS, MAY BE CONSIDERED UNDER FLORIDA RULE OF CRIMINAL PROCEDURE 3.800(a) IN LIGHT OF THE DEFINITION OF "ILLEGAL" SENTENCE SET OUT IN DAVIS v. STATE, 661 So.2d 1193 (Fla. 1995); STATE v. CALLAWAY, 658 So.2d 983 (Fla.1995); and KING v. STATE, 681 So.2d 1136 (Fla.1996), AND THE AMENDMENTS TO FLORIDA RULE OF CRIMINAL PROCEDURE 3.800(b) AND SECTION 924.051, FLORIDA STATUTES (1995)?
AFFIRMED in part, REVERSED in part, and REMANDED.
ERVIN, KAHN and DAVIS, JJ., concur.
NOTES
[1]  Appellant was apparently placed in a boot camp program, which he successfully completed on or about October 5, 1990, when an order was entered modifying his sentences to five years of probation.
[2]  Although appellant's motion was styled under rule 3.850, the courts have the authority to treat prisoner petitions as if the proper remedy had been sought. See Hall v. State, 643 So.2d 635 (Fla. 1st DCA 1994) (on reh'g); Young v. State, 619 So.2d 378 (Fla. 2d DCA 1993); DeSantis v. State, 400 So.2d 525 (Fla. 5th DCA 1981).
