
    THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee, v. GERALD M. HAYES, Defendant-Appellant.
    First District (2nd Division)
    No. 76-1729
    Opinion filed November 8, 1977.
    James Geis and Steven Clark, both of State Appellate Defender’s Office, of Chicago, for appellant.
    
      Bernard Carey, State’s Attorney, of Chicago (Laurence J. Bolon and Mary Ellen Dienes, Assistant State’s Attorneys, of counsel), for the People.
   Mr. JUSTICE PUSATERI

delivered the opinion of the court:

Defendant, Gerald M. Hayes, was convicted of attempt robbery, and he was placed on 2 years probation. Thereafter, he was found to have violated his probation and was sentenced to a term of 1 to 3 years on the original charge. The issue for review is whether defendant is entitled to credit for time spent on probation prior to the issuance of the probation violation warrant pursuant to section 5 — 6—4(h) of the Unified Code of Corrections. Ill. Rev. Stat. 1973, ch 38, par. 1005 — 6—4(h).

Defendant entered a plea of guilty to the charge of attempt robbery on June 19, 1974, and he was placed on 2 years probation. On February 10, 1975, a petition for violation of probation was filed and a warrant was issued. At a hearing held on June 8, 1975, he was found to have violated his probation, and he was sentenced to a term of 1 to 3 years on the original charge. Although the court made no comment on the record with respect to sentence credit, the order reflects that defendant was given credit for time served from March 17, 1975, the day he was taken into custody on the violation of probation warrant.

Defendant’s only contention is that he is entitled to credit for time served on probation prior to the issuance of the probation violation warrant pursuant to section 5 — 6—4(h) of the Unified Code of Corrections. (Ill. Rev. Stat. 1973, ch. 38, par. 1005 — 6—4(h).) That section, as it was originally enacted, provided in part for a mandatory credit of time served on probation before the issuance of the warrant for probation violation. Effective July 1, 1974, the relevant part of this section was amended to give the court discretion as to whether defendant would be given credit for time successfully served on probation.

In this case defendant’s probation was revoked after July 1, 1974, the effective date of the amendment, but he was convicted and placed on probation prior to that date. Although there is some authority which suggests the contrary (People v. Houston (2d Dist. 1975), 27 Ill. App. 3d 834, 327 N.E.2d 314; People v. Johnson (1st Dist. 1975), 25 Ill. App. 3d 503, 323 N.E.2d 539), we believe the better view is that a defendant who was placed on probation prior to July 1, 1974, should receive the benefit of the mandatory credit provision of the previous statute. To do otherwise would violate the constitutional prohibition against ex post facto laws. People v. Peach (3d Dist. 1976), 39 Ill. App. 3d 757, 350 N.E.2d 583; People v. Bowling (3d Dist. 1976), 43 Ill. App. 3d 932, 357 N.E.2d 724; People v. Meyer (4th Dist. 1976), 43 Ill. App. 3d 109, 356 N.E.2d 1303, appeal denied, 65 Ill. 2d 583; also see People v. Willingham (4th Dist. 1976), 38 Ill. App. 3d 612, 349 N.E.2d 120.

The State’s only contention is that defendant waived his right to the mandatory credit by failing to raise the question at the trial level. However, the doctrine of waiver is one of administrative convenience and not one of jurisdiction, and reviewing courts will consider errors not properly preserved in a criminal case where their nature is such as to deprive an accused of his rights. (See People v. Willis (1st Dist. 1976), 39 Ill. App. 3d 905, 351 N.E.2d 330; Ill. Rev. Stat. 1975, ch. 110A, par. 615(a).) In this case defendant’s right to be sentenced under the unamended statute providing for mandatory credit was not clearly established by case law at the time of trial, and depriving defendant of the benefits of statutorily mandated sentence credit would be fundamentaUy unfair. In this circumstance, we conclude that the doctrine of waiver should not be applied. See People v. Sarelli (1973), 55 Ill. 2d 169, 302 N.E.2d 317.

Accordingly, we affirm defendant’s conviction, and remand the cause to issue an amended mittimus reflecting credit for the time defendant successfully served on probation as well as for the time spent incarcerated while awaiting the probation revocation hearing.

Judgment affirmed and cause remanded.

DOWNING, P. J., and STAMOS, J„ concur.  