
124 P.3d 119 (2005)
2005 MT 276
329 Mont. 192
STATE of Montana, Plaintiff and Respondent,
v.
Kelvin Keith ERICKSON, Defendant and Appellant.
No. 04-242.
Supreme Court of Montana.
Submitted on Briefs April 5, 2005.
Decided November 1, 2005.
*120 Chad Wright, Appellate Defender, Helena, for Appellant.
Hon. Mike McGrath, Attorney General; John Paulson, Assistant Attorney General, Helena, Scott W. Herring, Dawson County Attorney, Glendive, for Respondent.
WARNER, Justice.
¶ 1 Kelvin Keith Erickson, (Erickson), appeals from a judgment entered in the District Court of the Seventh Judicial District, Dawson County, wherein he was convicted of two separate offenses as charged in separate informations. Separate sentences were imposed; however, they were handed down at *121 the same hearing and are contained in one written judgment that was filed in both cases. We reverse and remand for re-calculation of credit for time served on both sentences, and reverse and remand for resentencing relating to restitution.
¶ 2 We address the following issues on appeal:
¶ 3 1. Did the District Court err in calculating the amount of time due Erickson, as credit against his sentences, for time served in jail prior to judgment?
¶ 4 2. Did the District Court err in ordering Erickson to pay child support in lieu of fines, fees and restitution?

BACKGROUND
¶ 5 Erickson was arrested and placed in jail on November 1, 2001, and charged on December 4, 2001, in Dawson County No. DC-01-055, (DC-01-055), with Criminal Possession of Dangerous Drugs in violation of § 45-9-102(5), MCA. Bail was initially set at $50,000. The amount of bail was twice reduced and Erickson remained incarcerated until July 25, 2002, when after the second bail reduction he was able to post a commercial surety bond in the amount of $5,000 and was released.
¶ 6 After his release on bond, Erickson was again arrested for a separate offense on September 19, 2002, and charged on October 21, 2002, in Dawson County No. DC-02-048, (DC-02-048), with Unlawful Operation of a Clandestine Laboratory in violation of § 45-9-132, MCA. Bail was set at $250,000 in DC-02-048, and Erickson remained incarcerated until sentencing.
¶ 7 The District Court did not enter an order revoking Erickson's release on bail in DC-01-055. However, Erickson's appellate counsel submitted to this Court a copy of a revocation of the $5,000 surety bond Erickson posted to secure his release, as well as a certificate signed by the Dawson County Undersheriff indicating that Erickson was received into custody pursuant to such revocation. Erickson's appellate counsel moved this Court pursuant to Rule 9(f), M.R.App.P., to allow the appellate record to be supplemented to include this revocation, and this motion was granted on January 4, 2005.
¶ 8 Erickson eventually pled guilty to both charges, pursuant to a plea agreement. The District Court accepted Erickson's pleas and ordered a presentence investigation.
¶ 9 A sentencing hearing was held on December 19, 2003. At this hearing, the District Court followed the plea agreement, sentencing Erickson to five years in Montana State Prison, all suspended, in DC-01-055, and to ten years in Montana State Prison, with five years suspended, in DC-02-048. The sentences were ordered to run concurrently.
¶ 10 During the sentencing hearing, there was discussion on how much credit Erickson would receive for time served prior to the entry of judgment. According to the plea agreement, Erickson would get credit for time served between his arrest on the DC-02-048 charge and the time of sentencing. The District Court asked for explanation of this part of the plea agreement. Defense counsel explained that she expected that Erickson would receive credit for "400-some" days rather than "700-some" days, because the other sentence was to be suspended. The judgment credited Erickson with 289 days served in DC-01-055, which was apparently to be from the date of his initial arrest on November 1, 2001, to his release on bail on July 25, 2002. The judgment credited Erickson with 430 days served in DC-02-048, which was from September 19, 2002, the date of his arrest on that charge, until December 19, 2003, the date of sentencing.
¶ 11 Also, at the sentencing hearing, the District Court ordered that one-third of Erickson's prison earnings were to be forfeited as restitution, which was to be paid towards Erickson's delinquent child support. The District Court went on to note that, while the delinquent child support was not mentioned in the plea agreement, the Court could order such payment if necessary for rehabilitation, and the case could go to trial if this was considered a deviation. The oral sentence further ordered Erickson to repay his delinquent child support and remain current on his child support in lieu of requiring Erickson to pay cleanup costs connected with his *122 methamphetamine lab, attorney fees, or jury costs. The rate of such payment was to be worked out between Erickson and his probation officer.
¶ 12 In the written judgment dated December 23, 2003, the District Court described the child support order as Erickson's sole financial responsibility in lieu of any fine, fee, or restitution. The written judgment also specifies that one-third of Erickson's prison earnings would be forfeited for payment of restitution, without indicating what restitution Erickson would be paying.
¶ 13 Erickson appeals his sentences, arguing that he must be given credit in DC-01-055 for all the time served in jail, and further arguing that the District Court erred in ordering him to pay restitution in the form of child support.

STANDARD OF REVIEW
¶ 14 This Court reviews a criminal sentence for its legality. State v. Webb, 2005 MT 5, ¶ 8, 325 Mont. 317, ¶ 8, 106 P.3d 521, ¶ 8; State v. Eaton, 2004 MT 283, ¶ 11, 323 Mont. 287, ¶ 11, 99 P.3d 661, ¶ 11.

DISCUSSION

ISSUE ONE
¶ 15 Did the District Court err in calculating the amount of time due Erickson, as credit against his sentences, for time served in jail prior to judgment?
¶ 16 Relating to credit for time served in DC-02-048, Erickson argues that the District Court miscalculated the number of days credit he earned between his arrest on September 19, 2002, and sentencing. The District Court calculated that Erickson had been incarcerated for 430 days between September 19, 2002, and December 19, 2003, but Erickson was actually incarcerated for 457 days during this period. The State concedes that the District Court miscalculated the proper amount of credit for time served on this charge. Erickson must receive credit for the additional 27 days actually served.
¶ 17 Erickson insists that he must be given additional credit against his sentence in DC-01-055, for the time he spent in jail from September 19, 2002, the date of his re-arrest, until December 19, 2003, the date of sentencing. Erickson argues that his incarceration after September 19, 2002, was directly related to the initial possession charge from November 1, 2001, because the bond he had posted was revoked on September 18, 2002, and he was in jail awaiting trial on both charges. Thus, he argues that, pursuant to § 46-18-403(1), MCA, and State v. Kime, 2002 MT 38, 308 Mont. 341, 43 P.3d 290, overruled in part on other grounds by Eaton, ¶ 11, he must receive credit for pre-judgment incarceration on both charges.
¶ 18 The State argues that additional credit for time served in DC-01-055 should not be granted, because Erickson's incarceration after September 19, 2002, was not related to the charge of criminal possession of dangerous drugs, as the District Court had entered no order revoking his bail on that charge. The State also argues that Erickson's counsel acknowledged at the sentencing hearing that Erickson was not entitled to credit in DC-01-055 for the time he served following his arrest on September 19, 2002.
¶ 19 It is not clear how the District Court decided that Erickson was entitled to be credited with 289 days served on DC-01-055. The plea agreement only mentions credit for the time Erickson spent in jail awaiting trial in DC-02-048, and it makes no mention of the time Erickson was incarcerated pursuant to the first charge, DC-01-055. Also, it is not clear what charge the District Court and Erickson's counsel were talking about when credit for time served was discussed, in part because the number of days being discussed was vague, that is, "400-some" or "700-some." While the State suggests that the 289 days that was credited on DC-01-055 was meant to apply to Erickson's incarceration from November 1, 2001, until bond was posted on July 25, 2002, such period of incarceration was 267 days. The record before this Court shows that the actual periods of Erickson's pre-judgment incarceration are: 267 days from November 1, 2001, until July 25, 2002; and 457 days from September 19, 2002, until December 19, 2003, for a total of 724 days.
*123 ¶ 20 In determining credit for pre-judgment time served, the applicable statute reads as follows:
A person incarcerated on a bailable offense and against whom a judgment of imprisonment is rendered must be allowed credit for each day of incarceration prior to or after conviction, except that the time allowed as a credit may not exceed the term of the prison sentence rendered.
Section 46-18-403(1). In Kime, the defendant was arrested on November 26, 2000, and placed in the Gallatin County Detention Center on multiple charges. Kime, ¶ 3. The defendant was in a supervised release program at that time because of a prior felony assault conviction, and was transferred from the Gallatin County Detention Center to the Montana State Prison on December 5, 2000, to serve the remainder of his sentence for felony assault. Kime, ¶ 4. The defendant was sentenced on the charges stemming from his November 26, 2000, arrest on April 2, 2001, and he received credit on this charge only for the time he spent in the Gallatin County Detention Center from November 26, 2000, until December 5, 2000. He did not receive credit for his incarceration in the Montana State Prison from December 5, 2000, until April 2, 2001. Kime, ¶ 5. The defendant appealed, arguing that he should have received credit for all of his incarceration, including his incarceration in the Montana State Prison. Kime, ¶¶ 5, 8.
¶ 21 We concluded that the credit given by the District Court at sentencing was correct, because the defendant's incarceration at Montana State Prison, from December 5, 2000, until April 2, 2001, was related only to his prior felony assault conviction, not to the charges stemming from his arrest on November 26, 2000. Kime, ¶ 16. We noted that the purpose of § 46-18-403(1), MCA, was to insure that indigent and nonindigent defendants did not receive disparate treatment, and "[t]hat purpose is not served by crediting a defendant's sentence for time served where the defendant would not have been released from custody had he or she been able to post bail in any event as a result of being held on a sentence related to an earlier offense." Kime, ¶ 15. Thus, after Kime, "pursuant to § 46-18-403(1), MCA, a defendant's sentence may be credited with the time he or she was incarcerated only if that incarceration was directly related to the offense for which the sentence is imposed." Kime, ¶ 16.
¶ 22 In the present case, it is clear that § 46-18-403(1), MCA, requires that Erickson receive credit on his sentence in No. DC-01-055 for his incarceration from November 1, 2001, until bond was posted on July 25, 2002. If it is indeed true that Erickson's $5,000 bond was revoked by his bondsman on September 18, 2002, he would upon such revocation no longer have met the condition of his release on bail that he post a bond, and he would have been subject to immediate arrest on the possession charge, DC-01-055. Section 46-9-505, MCA. Likewise, if it is true that Erickson was surrendered to the Dawson County Sheriff in connection with DC-01-055, the Sheriff had the obligation to detain him in custody on that charge, and to notify the District Court that he was in custody on such charge. Section 46-9-510(2), MCA. The failure of the Sheriff to notify the District Court that he was in custody cannot be attributed to Erickson.
¶ 23 Erickson's arrest on DC-01-055 was unnecessary, however, because he was already in jail after his arrest on the DC-02-048 charge on September 19, 2002. Thus, the County Attorney had no incentive whatever to petition the District Court to formally revoke his bail in DC-01-055, and have an arrest warrant issued for a man that was already in jail.
¶ 24 It is clear under the circumstances of this case that, if Erickson's $5,000 bond was revoked by his bondsman pursuant to § 46-9-401(3), MCA, on September 18, 2002, and he was surrendered to the Sheriff, he was then incarcerated awaiting trial on the charges in DC-01-055 as well as those in DC-02-048. His incarceration was, in such instance, directly related to the charges in DC-01-055, and § 46-18-403(1), MCA, would require that he receive credit for the time between his arrest and when judgment was entered on that charge.
*124 ¶ 25 If the truth of the matter is that Erickson's bond in DC-01-055 was never revoked, the District Court would be correct that he was not incarcerated on that charge after his release on July 25, 2002, and he need not receive credit for such time served.
¶ 26 While the record on appeal includes a copy of the bond revocation, it has never been established in the District Court that Erickson's bond in DC-01-055 was revoked. Therefore, remand is necessary to determine whether Erickson's bond was in fact revoked in DC-01-055.
¶ 27 In considering this issue, we are aware that Erickson did not object at the sentencing hearing to the District Court's calculation of time served in DC-01-055. While there was no timely oral objection by Erickson, we have established an important exception to the rule that failure to timely object to a sentence risks waiver of a sentencing issue on appeal.
In State v. Lenihan (1979), 184 Mont. 338, 343, 602 P.2d 997, 1000, we held where a sentence was imposed in a criminal case, and the defendant appeals on the basis that the sentence is illegal or exceeds statutory mandates, "[i]t appears to be the better rule to allow an appellate court [jurisdiction] to review . . . even if no objection is made at the time of sentencing."
Eaton, ¶ 14 (citations omitted). In this case, the issue is the proper amount of time to credit Erickson for his incarceration. According to § 46-18-403(1), MCA, such credit must be allowed. As such, giving Erickson less credit than he is entitled to would violate statutory mandates, and thus the exception as stated in Eaton applies. It is not fatal to his appeal that Erickson did not timely object at sentencing.

ISSUE TWO
¶ 28 Did the District Court err in ordering Erickson to pay child support in lieu of fines, fees and restitution?
¶ 29 Erickson contends that the provisions of the judgment ordering him to pay child support are actually an imposition of a restitution obligation, and § 46-18-201(5), MCA, which deals with restitution, only allows restitution if a victim of the offense has suffered a pecuniary loss. Erickson argues that his children were not victims of the offenses charged, so restitution to them is not allowed by statute. Erickson further argues that the child support order has no correlation with the crimes for which he was sentenced, as required by State v. Horton, 2001 MT 100, 305 Mont. 242, 25 P.3d 886, overruled in part on other grounds by Eaton, ¶ 11. Finally, he requests the child support order be stricken, as was done in Horton.
¶ 30 The State argues that the order to pay child support was not restitution, but an acceptable invocation of the District Court's authority in cases involving a suspended sentence to impose "any other reasonable restrictions or conditions considered necessary for rehabilitation or for the protection of the victim or society." Section 46-18-201(4)(n), MCA. The State also argues that the question by Erickson's counsel regarding whether child support payments or possible cleanup costs regarding the clandestine lab charges should have priority was an implied suggestion that Erickson's rehabilitation would be better served by paying the child support and an invitation for the District Court to order the child support payment. The State goes on to argue that Erickson acquiesced to the child support payment order, and that he therefore waived this issue on appeal, citing State v. Micklon, 2003 MT 45, 314 Mont. 291, 65 P.3d 559. Finally, the State argues that if the child support order was outside the District Court's authority, the case should be remanded for resentencing as opposed to striking the child support order, asserting that the District Court intended to impose some financial obligation upon Erickson.
¶ 31 It is not clear from the record whether the District Court intended the child support order to be restitution or a condition of Erickson's probation. During the sentencing hearing, the District Court referred to the child support order as restitution, saying that one-third of Erickson's prison earnings would be forfeited for payment of restitution, which was to be paid to Erickson's delinquent child support. The District Court also seemed to suggest that payment of the child support was a condition of probation, noting that, *125 while the delinquent child support was not mentioned in the plea agreement, the Court could order such payment if necessary for rehabilitation. Then, in the written order, the District Court said the child support was Erickson's sole financial responsibility in lieu of fines, fees, and restitution. Another part of the written order required forfeiture of one-third of Erickson's prison earnings for payment of restitution, and the written order does not specify what restitution the prison earnings would pay.
¶ 32 Again, Erickson's failure to object to the child support order at the sentencing hearing is not fatal to his appeal. As described above, we have previously held that if a defendant contends that a criminal sentence exceeds statutory authority, the better rule is to allow appellate review, even if no objection was made at sentencing. Eaton, ¶ 14. We have also discussed why such an objection might not be made:
This Court recognizes the often uncertain position that a defendant faces during a sentencing hearing. A defendant who objects to a condition imposed during the sentencing hearing bears the risk that the judge could forego a more lenient sentence. Lenihan, 184 Mont. at 343, 602 P.2d at 1000. Thus, "a defendant often times must remain silent even in the face of invalid conditions," to guard against this possibility. Lenihan, 184 Mont. at 343, 602 P.2d at 1000.
Eaton, ¶ 14.
¶ 33 Erickson had been told by the District Court that, but for the plea agreement, the District Court would likely have given Erickson the maximum sentence. In addition, when the District Court mentioned that the child support was not mentioned in the plea agreement, it also noted that if this was considered a deviation, the case could go to trial. Given these statements by the District Court, it is understandable why Erickson did not object to his sentence for fear of receiving a harsher sentence.
¶ 34 If a Defendant invites a condition of his sentence, and acquiesces to such order, we have held that he cannot later successfully attack such condition as illegal. See Micklon, ¶ 10. However, in this instance, the District Court did not ask for Erickson's opinion regarding the child support order. In fact, the District Court suggested that if Erickson objected to this order, the cases could go to trial. The only support for the State's argument that Erickson invited and acquiesced to the child support order is the question by Erickson's counsel at the sentencing hearing regarding whether Erickson should give preference to making child support payments or possible cleanup costs regarding the clandestine lab charges. We do not agree that this statement served as an invitation for the District Court to make the child support order. Also, this statement was not made by Erickson. We conclude that Erickson neither invited nor acquiesced to the child support order.
¶ 35 The statutory authority for the payment of restitution is found at § 46-18-201(5), MCA (2001), which provides, in pertinent part, as follows:
In addition to any penalties imposed pursuant to subsection (1), if the sentencing judge finds that the victim of the offense has sustained a pecuniary loss, the sentencing judge shall require payment of full restitution to the victim as provided in XX-XX-XXX through XX-XX-XXX.
¶ 36 The offense of criminal possession of dangerous drugs has no identifiable victim. Thus, by statute, Erickson could not be ordered to pay restitution as part of his sentence in DC-01-055.
¶ 37 It is required that the amount of restitution be determined and fixed. Section 46-18-244(1), MCA; State v. Dunkerson, 2003 MT 234, ¶ 17, 317 Mont. 228, ¶ 17, 76 P.3d 1085, ¶ 17. There is no information in the record concerning what if any restitution may be due, and to whom it should be paid, relating to the offense of Unlawful Operation of a Clandestine Laboratory. Further, Erickson is correct that there is no correlation between his paying child support and his operation of a methamphetamine lab. A sentencing limitation or condition must have some correlation or connection to the underlying offense for which the defendant is being sentenced. State v. Ommundson, 1999 MT 16, ¶ 11, 293 Mont. 133, ¶ 11, 974 P.2d 620, *126 ¶ 11; Horton, ¶ 28. There is no such correlation or connection in this case between Erickson's conviction on the operation of a methamphetamine laboratory charge and ordering him to pay his child support. Consequently, the District Court's order did not meet the statutory requirements for the imposition of restitution on a suspended sentence.
¶ 38 We have previously considered whether to strike a the child support order illegally imposed in a criminal sentence and end the matter, or remand for resentencing.
This Court has not adopted clear-cut rules concerning the appropriate remedy for a partially illegal sentence. In general, we have vacated or remanded with instructions to strike when the illegal portion of a sentence was a condition of a suspended sentence or a sentence enhancement. See, e.g., [State v.] Shockley, [2001 MT 180, ¶ 11, 306 Mont. 196, ¶ 11, 31 P.3d 350,] ¶ 11. We generally have remanded for resentencing when the illegal portion "affect[ed] the entire sentence" or when we were unable to discern what sentence the trial court would have imposed had it correctly applied the law. See, e.g., [State v.] Williams, [2003 MT 136, ¶ 15, 316 Mont. 140, ¶ 15, 69 P.3d 222,] ¶ 15; [State v.] Brister, [2002 MT 13, ¶ 28, 308 Mont. 154, ¶ 28, 41 P.3d 314,] ¶ 28. Having set forth these two relatively distinct categories of cases involving partially illegal sentences, we conclude it is not practicable to articulate a "one size fits all" rule. Therefore, we examine the sentence and record to determine the appropriate remedy.
State v. Heath, 2004 MT 58, ¶ 49, 320 Mont. 211, ¶ 49, 89 P.3d 947, ¶ 49. In arguing that we should strike the child support order, Erickson notes that the child support order in Horton was stricken. While this is correct, there is no suggestion in Horton that there was consideration of other payments. This case is different. At the sentencing hearing, the District Court made clear that the order to pay child support was in lieu of requiring Erickson to pay cleanup costs associated with the clandestine laboratory, attorney fees, or jury costs. The record clearly suggests that the District Court may have imposed both costs and a restitution order if not for the imposition of a child support obligation, which we have now found to be illegal. Thus, we are unable to discern what sentence the District Court would have imposed had it correctly applied the law. This case is appropriately remanded for resentencing on whether Erickson must pay restitution and costs.

CONCLUSION
¶ 39 The portions of the judgments in Dawson County Nos. DC-01-055 and DC-02-048 relating to credit for time served prior to entry of judgment and payment of child support are reversed. This case is remanded to the District Court of the Seventh Judicial District, Dawson County, for a determination of whether Erickson's bond on DC-01-055 was revoked, for calculation of and ordering of credit against his sentences in conformity with this opinion, and for reconsideration of restitution and payment of costs as provided by §§ 46-18-241 through 249, MCA.
We Concur: W. WILLIAM LEAPHART, PATRICIA O. COTTER, JIM RICE, BRIAN MORRIS, JJ.
