delivered the opinion of the court:
Defendant, Steven G. Wills, appeals from the denial of his motion to modify sentence, entered in the circuit court of Perry County. In this cause, defendant raises three issues: (1) whether the trial court erred in imposing consecutive sentences when defendant was not admonished that the sentences could be consecutive, (2) whether the trial court erred in imposing more than two consecutive sentences, and (3) whether the trial court abused its discretion *641in imposing the maximum sentence allowable. We vacate and remand with directions.
Originally, defendant was charged in two separate cases with numerous counts of theft over $300 and several counts of forgery involving multiple victims. The crimes occurred in 1986 when defendant worked as an investigator for two personal injury attorneys. Defendant admitted that he participated in a scheme to induce personal injury clients to invest proceeds of their settlements. Instead of investing the money as arranged, defendant used the money for himself. When the clients sought return of their money, the attorney who employed defendant denied any knowledge that the money had not been properly invested and blamed defendant for the resulting losses. Defendant, on the other hand, admitted to wrongdoing but insisted that his employer was a coconspirator.
Prior to being arrested on the instant charges, defendant was charged and sentenced on a Federal offense. In the summer of 1991, defendant was serving time on the Federal offense and was returned to Illinois to face the instant charges. The State negotiated with defendant, and on January 2, 1992, defendant pleaded guilty to four counts of theft over $300. Three separate victims were involved. The plea was a partially negotiated disposition in which the question of defendant’s incarceration was left open. Defendant agreed to pay a total of $10,000 in restitution to the victims, but the plea agreement left open the question of whether any additional fines or penalties should be assessed. At the time the negotiated plea was entered, counsel for defendant advised the court that defendant was changing his position in reliance upon the agreement prior to sentence. Defense counsel specifically stated:
“Just for the record, what this envisions is that this will allow the defendant to go ahead in reliance of this agreement, actually in effect change his position by agreeing to give statements to the various people who are investigating the [attorneys]. And as the State’s Attorney has indicated the amount of restitution has been agreed to by the victims in this case.”
A review of the record in this case shows that defendant cooperated with authorities to make a case against the attorneys for whom he worked. The victims involved requested leniency for this defendant so that he would cooperate in the investigation against his former employers.
Defendant was admonished by the court about possible sentences. Defendant was told that he could receive two to five years’ *642imprisonment on each count. He was also advised with regard to an extended-term sentence. At no time was he admonished that he could be sentenced to consecutive sentences on these four counts. Ultimately, the trial court imposed four five-year consecutive prison sentences, which were also to run consecutively to defendant’s Federal sentence. Defendant was fined $10,000 on each charge and ordered to pay $10,000 in restitution. Defendant was denied credit for time served in the Perry County jail while awaiting disposition of the instant charges.
Defendant filed a motion to modify his sentence, asking that the sentences run concurrently so as to conform to the admonishments of the trial court. Defendant also filed a motion to withdraw his guilty plea, which was later withdrawn. The trial court denied defendant’s motion but offered to allow defendant to withdraw his guilty plea. Defendant rejected this offer and argued that the sentence be reduced in accordance with the admonitions. The trial court refused and this appeal followed.
The first issue we are asked to consider is whether the trial court erred in imposing consecutive sentences when defendant was not admonished that the sentences could be consecutive. Defendant contends that the trial court erred in imposing consecutive sentences when defendant was not advised that consecutive sentences were a possibility. Defendant contends that in order to rectify the situation the sentences must be ordered to run concurrently because defendant changed his position in reliance on acceptance of the plea. Defendant cooperated with authorities in the investigation of the attorneys who employed him, which implicated not only the attorneys but also himself. Defendant also assisted the victims in their civil case against the attorneys. Under these circumstances, defendant contends there is no way that he can be placed in the position he was before the plea was accepted and, thus, the sentences must run concurrently. The State’s reply is that defendant has waived his right to relief. According to the State, defendant had only two options after pleading guilty and being sentenced. First, defendant could have filed a motion to withdraw the guilty plea based on its involuntary nature due to insufficient admonishments, or second, defendant could have filed a motion to modify seeking a reduction of the sentences. The State contends that defendant is not entitled to intermix the remedies because he should not be able to retain the benefits of his guilty plea, including the dismissal of numerous other charges, while also obtaining a substantial reduction in the length of his sentences. Moreover, the State contends *643that vacating the guilty plea is an adequate remedy because defendant has the ability to protect himself against any prejudice which might otherwise result from his making incriminating statements in reliance on a plea agreement. For example, defendant could file motions in limine to preclude use of those statements based upon their lack of voluntariness.
Supreme Court Rule 402 provides that before accepting a guilty plea a defendant must be admonished as to “the minimum and maximum sentence prescribed by law, including, when applicable, the penalty to which the defendant may be subjected because of prior convictions or consecutive sentences.” (Emphasis added.) (134 Ill. 2d R. 402(a)(2).) A court’s failure to substantially comply with this dictate renders a defendant’s guilty plea involuntary. (People v. Akers (1985), 137 Ill. App. 3d 922, 926-27, 484 N.E.2d 1160, 1163; People v. Lundeen (1977), 55 Ill. App. 3d 799, 371 N.E.2d 329.) Where a defendant is not admonished prior to a guilty plea that consecutive sentences might be imposed, consecutive sentences cannot be imposed. (People v. Lundeen (1977), 55 Ill. App. 3d 799, 371 N.E.2d 329; People v. Willingham (1976), 38 Ill. App. 3d 612, 349 N.E.2d 120; People v. Flannigan (1971), 131 Ill. App. 2d 1059, 247 N.E.2d 739.) In this regard the Flannigan court specifically stated:
“Where a defendant is charged with more than one crime, the manner in which he may have to serve the sentences imposed for those crimes, whether consecutively or concurrently, is obviously a consequence of his plea, and must be considered as crucial to his decision as the admonition on the maximum penalty for each of the charges. ***
*** The validity of defendant’s guilty plea must be reviewed in the posture in which that plea was entered and defendant is entitled to enter his plea with full knowledge of the possible consequences of that plea as they exist at that time.” (Flannigan, 131 Ill. App. 2d at 1064-65, 267 N.E.2d at 744.)
Basically, a court’s failure to state the penalty to which a defendant may be subjected because of consecutive sentences renders a defendant’s plea involuntary. (People v. Butler (1989), 186 Ill. App. 3d 510, 541 N.E.2d 171.) Whether reversal is required depends on whether real justice has been denied or whether defendant has been prejudiced by the inadequate admonishment. People v. Davis (1991), 145 Ill. 2d 240, 582 N.E.2d 714.
*644In People v. McCracken (1992), 237 Ill. App. 3d 519, 604 N.E.2d 1104, the defendant, who was charged with Class 4 driving under the influence (DUI) because he had three or more prior DUI violations (Ill. Rev. Stat. 1989, ch. 95V2, pars. ll-501(d)(1), 6-303(d)), was never informed that there was a possibility that the sentence then in issue would be consecutive to a three-year prison sentence for a DUI conviction in another county. The McCracken court found that since the trial court’s admonishments left the defendant believing that his sentences would not be consecutive, the defendant’s guilty plea must be remanded to allow him to plead anew. (Mc-Cracken, 237 Ill. App. 3d at 521-22, 604 N.E.2d at 1106.) The problem in the instant case is that defendant has relied to his detriment on the admonishments of the trial court. Vacating the sentences and allowing defendant to plead anew will not correct the situation here.
The trial court did not admonish as to the possibility of consecutive sentences. Relying on the admonishments of the trial court, defendant then gave statements to authorities implicating himself and his former employees. Defendant made restitution to the victims and assisted them in their civil case against his former employers. Defendant argues that because the trial court did not admonish him about the possibility of consecutive sentences, the sentences must be ordered to run concurrently in order to comply with the trial court’s representations as the maximum sentence. In support of his argument defendant cites United States ex rel. Baker v. Finkbeiner (7th Cir. 1977), 551 F.2d 180. In Baker, the petitioner (defendant in the State court) was seeking habeas relief because he was not advised of a mandatory parole term which automatically became part of his sentence. Petitioner agreed to plead guilty, not knowing of the mandatory parole term, in exchange for the prosecutor’s promise that he would recommend a specific sentence of one to two years. Before accepting this plea, the State trial judge informed the defendant of the statutory range of imprisonment for the pending charges and told the defendant that his sentence would conform to the plea agreement. The trial court failed to mention that mandatory parole term, and neither the defense attorney nor the prosecutor remedied the omission. The defendant served his sentence and was released on parole. After violating parole, the defendant was imprisoned for an additional term. The Baker court held that because the defendant was given a substantially more onerous sentence than he was promised, his guilty plea had been unfairly induced in violation of the due process clause of the four*645teenth amendment. (Finkbeiner, 551 F.2d at 183-84.) The defendant’s guilty plea was thus involuntary since the defendant lacked a full understanding of its consequences. To remedy the situation, the Baker court did not vacate the guilty plea, as vacating the plea would have permitted the State to reprosecute a defendant who had already performed his part of the bargain by serving his prison sentence. The Baker court determined that fundamental fairness required that the State be compelled to adhere to the agreement, and the Baker court ordered the petitioner released from custody. (Finkbeiner, 551 F.2d at 184; see also United States ex rel. Ferris v. Finkbeiner (7th Cir. 1977), 551 F.2d 185.) Likewise, defendant herein asks not that he be allowed to withdraw his guilty plea but rather that the sentence be reduced to conform with the trial court’s admonishments.
Illinois courts have also modified sentences to reflect the maximum penalty promised by the trial court. For example, in People v. Jackson (1973), 13 Ill. App. 3d 232, 300 N.E.2d 557, the defendant, who originally pleaded guilty to the offense of aggravated battery, challenged an order which revoked his probation and imposed a sentence from two to 10 years in the penitentiary. At the time the defendant pleaded guilty, he was admonished by the court that he could be sentenced to not less than one year nor more than five years in the penitentiary. In affirming the conviction, the Jackson court determined that the defendant’s sentence must be modified to reflect the maximum penalty promised by the trial court. The Jackson court specifically stated:
“It is readily apparent that an accused’s knowledge of the consequences is not only a determining factor in the voluntariness of his plea but is often an inducement to a guilty plea.
Justice and fairness demand that if a guilty plea rests on an inaccurate representation as to the maximum penalty the promise implied in the representation should be fulfilled.” (Jackson, 13 Ill. App. 3d at 236, 300 N.E.2d at 560.)
The Jackson court then reduced defendant’s maximum prison sentence to five years.
In the instant case, we find that the consecutive sentences imposed were fundamentally unfair to defendant, who was never admonished that he could receive consecutive sentences. We agree with defendant that his sentences must be ordered to run concurrently because defendant relied to his detriment on the trial court’s admonishments and made statements against his interest implicating himself in the schemes. Defendant was prejudiced by the trial *646court’s inadequate admonishment. (Cf. People v. Coultas (1979), 75 Ill. App. 3d 137, 394 N.E.2d 26 (where the defendant was unable to establish any prejudice but a mere technical violation of Supreme Court Rule 402).) Here, due process demands that the trial court’s admonition define the maximum sentence, including the possibility of consecutive sentences. We cannot agree that defendant should have proceeded on his motion to withdraw his guilty plea. Defendant could not adequately be protected by motions in limine. Defendant had paid some restitution and cooperated with the State in the cases against his ex-employers and also cooperated with the victims in their case against defendant’s ex-employers. Defendant has undeniably been prejudiced.
The State contends that even if we agree with defendant that his sentences should be reduced because defendant was not admonished that the aggregate of his prison sentences could amount to a total of 20 years, we should only reduce defendant’s prison sentences to 10 years rather than five years because defendant was advised that he could receive an extended term of 10 years’ imprisonment. The State admits that defendant was not eligible for an extended term but argues that that fact is inconsequential. We disagree.
The cases cited by the State in support of this argument are all distinguishable from the case at bar. For example, in People v. Beck (1989), 190 Ill. App. 3d 748, 546 N.E.2d 1127, the defendant was a 14-year-old juvenile who was not eligible for an extended term because of his age. The Beck court determined that even if the defendant was not eligible for an extended term, the extended-term statute served the purpose of a measuring statute (Ill. Rev. Stat. 1985, ch. 38, par. 1005—8—2) for the consecutive sentence statute (Ill. Rev. Stat. 1985, ch. 38, par. 1005—8—4). (Beck, 190 Ill. App. 3d at 763-64, 546 N.E.2d at 1137.) However, in Beck, as in the other cases cited by the State, the question of whether defendant was properly admonished about the possibility of consecutive sentences never arose. In the instant case, we cannot agree with the State that defendant can be sentenced to consecutive prison terms for a total of 10 years when even the State agrees that defendant was ineligible for an extended term. The record is clear, and the State readily admits, that defendant was never advised he was eligible for consecutive sentences.
Finally, defendant contends that the trial court erred in refusing to give him credit for time served in the county jail while awaiting disposition of these charges, because the trial court failed *647to advise defendant that it was possible he would not receive credit for time served in the county jail on these charges. The State replies that no such admonishment is required under Supreme Court Rule 402, and because defendant was in the county jail pursuant to the agreement on detainers (Ill. Rev. Stat. 1991, ch. 38, par. 1003— 8 — 9), defendant was not entitled to credit against the instant sentences at least until he was sentenced in the case at bar. We agree.
Section 5 — 8—7(b) of the Unified Code of Corrections provides:
“(b) The offender shall be given credit on the determinate sentence or maximum term and the minimum period of imprisonment for time spent in custody as a result of the offense for which the sentence was imposed, at the rate specified in Section 3 — 6—3 of this Code.” (Ill. Rev. Stat. 1985, ch. 38, par. 1005-8-7(b).)
A review of Supreme Court Rule 402 shows there is no requirement that a defendant be advised it is possible he will not receive credit for time served in the county jail prior to the disposition of a case. Here, defendant was already sentenced and serving time for a Federal offense and was brought to Illinois pursuant to the agreement on detainers. Defendant was not confined because of the charges pending against him in Illinois but was confined due to his sentence on a previous Federal offense. (See People v. Harvey (1991), 213 Ill. App. 3d 83, 571 N.E.2d 1185; People v. Gardner (1988), 172 Ill. App. 3d 763, 527 N.E.2d 155.) We do not believe that defendant is entitled to any additional credit for time served against his sentence.
For the above reasons, the judgment of the circuit court of Perry County sentencing defendant to consecutive terms is hereby vacated, and the cause is remanded for issuance of an amended judgment order and mittimus in conformity with this opinion. Defendant’s sentences are to run concurrently to each other and concurrent to defendant’s Federal sentence. Defendant is entitled to no additional credit for time served against his sentence. Because of our decision on the first issue raised by defendant, we need not address the additional arguments raised by defendant.
Affirmed in part; vacated in part and remanded with directions.
CHAPMAN, P.J., and LEWIS, J., concur.