We reverse and remand the appellant’s sentence. The amendment to Chapter 88-131, Section 1, Laws of Florida, should not have been applied in this ease *427because the offenses occurred prior to its taking effect. See Castle v. State, 330 So.2d 10 (Fla.1976). The maximum sentence that could have been imposed, therefore, is seven years, the top of the recommended guidelines range plus the permissible one cell escalation for violation of probation.
The trial court imposed a special probation condition of nine years imprisonment. This was improper. A probation condition of incarceration which equals or exceeds one year in the county jail is invalid. See Section 948.03(7), Florida Statutes (1987); Villery v. Florida Parole and Probation Comm’n, 396 So.2d 1107 (Fla.1985).
Lastly, the appellant argues that the trial court failed to credit him gain time on his original sentence. A review of the record fails to disclose whether the trial court considered gain time in affording the appellant credit towards his sentence. Accordingly, on remand, the trial court should award the appellant any gain time to which he is entitled by law.
REVERSED AND REMANDED FOR FURTHER PROCEEDINGS CONSISTENT HEREWITH.
ANSTEAD and WARNER, JJ., and WALDEN, JAMES H., (Retired) Associate Judge, concur.