
93 P.3d 758 (2004)
135 N.M. 737
2004-NMCA-080
STATE of New Mexico, Plaintiff-Appellee,
v.
Ronnie E. ORTEGA, III, Defendant-Appellant.
No. 23,892.
Court of Appeals of New Mexico.
April 21, 2004.
Certiorari Denied June 30, 2004.
Patricia A. Madrid, Attorney General, M. Victoria Wilson, Assistant Attorney General, Albuquerque, NM, for Appellee.
John B. Bigelow, Chief Public Defender, Steven J. Potter, Assistant Appellate Defender, Santa Fe, NM, for Appellant.
Certiorari Denied, No. 28,649, June 30, 2004.

OPINION
WECHSLER, Chief Judge.
{1} This appeal raises a variation of the issue of whether the 2002 amendment to the habitual offender statute, NMSA 1978, § 31-18-17 (2002), applies to the enhancement of a sentence after July 1, 2002, the effective date of the amendment. The amendment in part *759 excludes a felony conviction from habitual offender consideration when ten years or more have passed between the current conviction and the completion of the latter of the sentence, probation, or parole of the prior conviction. Section 31-18-17(D).
{2} In State v. Shay, 2004-NMCA-077, ¶ 23, 136 N.M. 8, 94 P.3d 8, 2004 WL 1541927 [No. 23,594 (N.M.Ct.App. Apr. 21, 2004)], also filed today, we hold that the amendment applies when the district court sentences for the underlying crime after July 1, 2002 if the supplemental information charging the habitual offender status is also filed on or after July 1, 2002. In this appeal, the district court accepted a plea agreement and entered sentence prior to July 1, 2002. The sentence included a suspended sentence and probation. After a probation violation, the district court ordered the basic sentence to be served as well as a habitual offender enhancement for a prior felony conviction that would not have been included for enhancement purposes under the 2002 amendment. Because the district court had imposed sentence prior to July 1, 2002 based on the plea agreement, it properly applied NMSA 1978, § 31-18-17 (1993). We nevertheless reverse due to an ambiguity in the sentence and remand for correction of the sentence.

Factual and Procedural Background
{3} Defendant Ronnie Ortega, III was indicted for larceny of a firearm, larceny over $250, felon in possession of a firearm, and unlawful carrying of a deadly weapon. He entered into a plea agreement, agreeing that he would plead guilty to the larceny over $250 and felon in possession of a firearm charges and that the other charges would be dismissed. As to prior felony convictions and habitual offender enhancement, the plea agreement provided that: Defendant would admit to convictions of possession of marijuana in 1985, forgery in 1992, and possession of cocaine in 1992; the 1992 forgery conviction would be the predicate offense for the felon in possession of a firearm charge; the sentence for one of the felonies subject to the plea agreement would be enhanced by four years based on two prior convictions; the State would file additional habitual offender proceedings if Defendant violated the plea agreement or conditions of probation or parole, which would mean that the sentence for the other felony subject to the plea agreement could be enhanced by four years; and Defendant agreed to waive his right to object to any sentence imposed under the plea agreement.
{4} The district court accepted the plea agreement. It adjudged Defendant guilty of larceny over $250 and possession of a firearm by a felon and found that Defendant had two prior felony convictions as a habitual offender. It sentenced Defendant to concurrent eighteen-month terms for each of the current charges and a four-year enhancement as a habitual offender on the larceny over $250 charge. It suspended eighteen months of the five and one-half year prison sentence and ordered supervised probation for eighteen months after Defendant completed his term of imprisonment.
{5} On June 20, 2002, after Defendant had served approximately four months of his period of probation, the State filed a motion to revoke Defendant's probation for violating its terms. It filed a supplemental information on November 1, 2002 to enhance Defendant's sentence for felon in possession of a firearm. Defendant admitted to the probation violation. At the sentencing hearing, Defendant argued that the 1985 conviction for possession of marijuana could not be used to enhance his sentence because it occurred more than ten years prior to the conviction for felon in possession of a firearm and thus was not a prior felony conviction under the 2002 amendment to the habitual offender statute. The district court rejected the argument and entered judgment and sentence on December 9, 2002, sentencing Defendant to custody for the balance of his basic sentence, fourteen months for larceny over $250, and eighteen months for felon in possession of a firearm, and to a four-year enhancement as a habitual offender on the felon in possession of a firearm charge. Defendant appeals.

Habitual Offender Enhancement
{6} In Shay, an opinion addressing two appeals, the defendants committed the *760 crimes prior to July 1, 2002, the effective date of the 2002 amendment. Shay, 2004-NMCA-077, ¶ 3. For each defendant, the conviction, filing of the supplemental information, and sentencing were after the effective date. Id. ¶¶ 2-3. Our holding construed the legislative intent to intend the amendment to have effect as of the effective date for all crimes for which the penalty had not already been imposed based in part on NMSA 1978, § 12-2A-16(C) (1997), which states that "[i]f a criminal penalty for a violation of a statute or rule is reduced by an amendment, the penalty, if not already imposed, must be imposed under the statute or rule as amended." We reasoned that because a habitual offender is punished by virtue of the conviction of the underlying crime and the enhanced sentence is punishment for the underlying crime, the amendment would apply to a defendant who had not been sentenced for the underlying crime at the effective date of the amendment. Shay, 2004-NMCA-077, ¶ 21.
{7} The reasoning of Shay does not apply to this case. Viewed from the perspective of the sentence the district court imposed, Defendant committed the crimes, entered into a plea agreement, and was sentenced under the plea agreement prior to the effective date of the 2002 amendment. Although Defendant did not receive the enhancement in question, the district court had imposed sentence for the underlying crime of felon in possession of a firearm. That sentence included a suspended sentence and a period of probation. It was subject to the statutory condition that the court could impose the full sentence if Defendant failed to fulfill the conditions of his probation. See NMSA 1978, § 31-21-15(B) (1989) (stating that upon establishment of a parole violation, a defendant may be required to serve "any sentence which might originally have been imposed"). Under the district court's sentence and the plea agreement, the full sentence included an additional eighteen month prison term and a four-year enhancement as a habitual offender. Defendant negotiated and benefitted from the plea agreement; two charges were dismissed and the court imposed sentence holding in abeyance the four-year habitual offender enhancement. When Defendant violated the terms of his probation, the court's action followed the sentence it had imposed and enforced the conditions that were before it at the time it approved the plea agreement.
{8} From the perspective of the habitual offender statute, we reach the same result. The statute applies to an enhancement upon the conviction of a crime. A probation violation is not a crime and does not trigger an enhancement as a habitual offender. See State v. Sanchez, 94 N.M. 521, 523, 612 P.2d 1332, 1334 (Ct.App.1980) (stating that a hearing on probation revocation "is not a trial on a criminal charge," but rather a hearing determining whether the defendant has breached the probation order). Therefore, the additional enhancement at the time of the probation violation relates to the district court's sentence for the underlying crimes before the 2002 amendment to the habitual offender statute took effect. Because this sentence had been imposed before July 1, 2002, the 2002 amendment to the habitual offender statute did not apply.
{9} Moreover, as part of the plea agreement, Defendant waived any existing or future objection to judgment consistent with the agreement. He agreed that the State could file habitual offender proceedings against him in the event of a probation violation and could use his admission concerning his prior felony convictions. As we have stated, Defendant benefitted from the plea agreement. The habitual offender enhancement at the time of the probation violation carried out the expectation of the parties under the plea agreement. Defendant waived his present argument that the habitual offender enhancement is unlawful. See State v. Sanchez, 2001-NMCA-060, ¶¶ 20-21, 130 N.M. 602, 28 P.3d 1143 (upholding waiver of collateral attack of prior convictions in plea agreement when the defendant subsequently contested their validity at probation revocation); State v. Joanna V., 2003-NMCA-100, ¶¶ 6-10, 134 N.M. 232, 75 P.3d 832 (holding that child failed to preserve argument that detention for violating court orders was illegal by entering plea agreement agreeing to the detention).


*761 Sentencing Ambiguity
{10} Defendant additionally argues on appeal that the district court's sentence after the probation revocation violated Defendant's protections against double jeopardy because it constitutes multiple punishments for the same offense. Defendant contends that the district court improperly split the basic sentences for larceny over $250 and felon in possession of a firearm such that Defendant would serve the fourteen-month balance of the basic sentence for larceny over $250 concurrently with the habitual offender sentence for felon in possession of a firearm and then serve the eighteen-month basic sentence for felon in possession of a firearm at the conclusion of the habitual offender sentence.
{11} There is an ambiguity in the sentencing order. It reads:
The Defendant is hereby found to have violated his probation in the above captioned cause and to be an Habitual Offender with two (2) prior felony convictions and is sentenced to the custody of the Corrections Department for the remaining fourteen (14) months of the eighteen (18) months on the basic sentence for Count II, LARCENY OVER $250 and to the eighteen (18) months basic sentence plus a four (4) year Habitual Offender enhancement on Count III, FELON IN POSSESSION OF A FIREARM with the enhancement to be served prior to the basic sentence, for a total of five and one-half (5 1/2) years, running concurrent to the remaining time in Count II for a total of five and one-half years, of which eighteen months is suspended for a total of four (4) years incarceration.
{12} The sentencing order can be read, as Defendant argues, that the sentences for larceny over $250 and felon in possession of a firearm are to run concurrently and that the felon in possession of a firearm sentence is to begin with the habitual offender enhancement and be followed by the basic sentence. The language "running concurrent to the remaining time in Count II" appears to relate to the district court's entire sentence for felon in possession of a firearm. With this reading, the sentencing order would improperly split Defendant's sentences for larceny over $250 and felon in possession of a firearm, which were originally ordered to run concurrently, because the basic sentence for the larceny over $250 offense would be served at the same time as the habitual enhancement for felon in possession of a firearm offense. See State v. Martinez, 99 N.M. 248, 250, 656 P.2d 911, 913 (Ct.App.1982) (reversing splitting of a single original sentence upon revocation of probation).
{13} The district court expressed a different intent at the sentencing hearing, stating that it was "inclined to give [Defendant] the mandatory four [years and] suspend the underlying." Given the ambiguity of the sentencing order and the different intent stated at the sentencing hearing, we would ordinarily remand for the district court to clarify its sentence. However, because Defendant's reading results in an improper sentence, we remand for the district court to correct the sentencing order to reflect that the basic sentences for larceny over $250 and felon in possession of a firearm are to run concurrently, with the four-year enhancement of the felon in possession conviction to be served prior to the concurrent basic sentences.
{14} The ambiguity appears to have been in the drafting of the order caused by the inclusion of fourteen months as the balance of the basic eighteen months sentence for larceny over $250 and eighteen months as the balance for the felon in possession of a firearm sentence. Defendant served four months probation. Because that time was part of the original eighteen months suspended sentence which the district court ordered to be served concurrently for the crimes of larceny over $250 and felon in possession of a firearm, the district court should have given credit for the four months probation to the concurrent term for both crimes. See § 31-21-15(B) (limiting imprisonment options on probation revocation to maximum of original sentence); State v. Reinhart, 79 N.M. 36, 38, 439 P.2d 554, 556 (1968) (requiring credit for time served on probation against sentence on probation revocation); State v. Sublett, 78 N.M. 655, 658, 436 P.2d 515, 518 (Ct.App.1968) (noting entitlement to credit for probation *762 time served on suspended sentence being revoked).
{15} We reverse Defendant's sentence on probation revocation and remand to the district court so that it can correct the sentence.

Conclusion
{16} The 2002 amendment to Section 31-18-17 does not apply to Defendant's sentence for a probation violation when the original sentence was imposed prior to the amendment's effective date under the plea agreement. However, because of the ambiguity in the sentencing order, we reverse and remand for correction of the sentence.
{17} IT IS SO ORDERED.
WE CONCUR: A. JOSEPH ALARID and CYNTHIA A. FRY, Judges.
