
374 N.W.2d 649 (1985)
STATE of Iowa, Appellant,
v.
Robert H. SOPPE, Appellee.
No. 84-1595.
Supreme Court of Iowa.
September 18, 1985.
*650 Thomas J. Miller, Atty. Gen., Rebecca L. Claypool, Asst. Atty. Gen., and James W. Herrig, Co. Atty., for appellant.
Charles L. Harrington, Appellate Defender, and Raymond E. Rogers, Asst. Appellate Defender, for appellee.
Considered by REYNOLDSON, C.J., and UHLENHOPP, HARRIS, McGIVERIN, and SCHULTZ, JJ.
REYNOLDSON, Chief Justice.
In this appeal we hold a deferred judgment for operating a motor vehicle while intoxicated (OWI), granted before the statutory amendment to Iowa Code section 321.281 that permitted such proceedings to be counted as a prior violation for enhanced punishment, may not be used for that purpose. Even though this was the basic ruling of the trial court, we reverse because of the unusual posture of the appeal, and remand with directions.
The facts are not in dispute. August 13, 1984, defendant Robert H. Soppe was charged by trial information with OWI, second offense, in violation of Iowa Code section 321.281(1)(a) (1983) as amended.[1] On the same day, pursuant to Iowa Rule of Criminal Procedure 6(5),[2] the prosecution filed the "Supplemental Trial Information," charging first offense OWI. The supplemental information was assigned a separate number in the clerk's office. Defendant filed a motion to dismiss the basic second offense trial information, alleging at the time he received the deferred judgment in 1980 he was advised by counsel and the court that when his probation was completed the proceeding would not be on his record and could not be used against him. Defendant further alleged to invoke the amendment that did not become effective until July of 1984 would be an ex post facto application of the criminal statute.
Trial court sustained the motion. It found that the legislature did not intend the amendment to violate the ex post facto provisions of the Iowa and United States Constitutions; that the legislature intended the amendment to be prospective in operation only. The court concluded the entry of a deferred judgment in 1980 could not be "used as an enhancement to second offense an OWI occurring after July 1, 1984." Trial court then dismissed the second offense information and set a date for the trial to proceed on the supplemental trial information.
The State filed notice of appeal and upon its motion we stayed further trial court proceedings.
*651 I. We first deal with a threshold issue. At the oral submission of this appeal defendant for the first time challenged our jurisdiction, asserting the State had no right to appeal.
The court's jurisdiction of the case may of course be questioned at any time. See Uchtorff v. Dahlin, 363 N.W.2d 264, 267 (Iowa 1985). "[T]his court has a duty to determine its own jurisdiction and to refuse, on its own motion, to entertain an appeal not authorized by rule." Jensen v. State, 312 N.W.2d 581, 582 (Iowa 1981).
Iowa Code section 814.5(1)(a) (1983) grants a right of appeal to the state from "[a]n order dismissing an indictment, information, or any count thereof." Here the court dismissed the second offense trial information. Defendant, however, argues the district court's ruling struck only a portion of the information, consequently the State had no right of appeal from the order. See State v. Bock, 357 N.W.2d 29, 31 (Iowa 1984); Iowa Code § 814.5 (1983); Iowa R.Crim.P. 6(5). That, of course, was not the effect of the court's ruling, which dismissed the basic trial information and treated the supplemental trial information as a separate charging instrument.
Although it is not controlling in our disposition of the case, there is a serious question whether a rule 6(5) supplemental trial information, standing alone, could stand as a separate charging instrument under which a defendant properly could be prosecuted. The language of Iowa Rule of Criminal Procedure 6(5) suggests such an information is a mechanical and supplemental device for trial purposes only, designed solely to withhold from the jury the prejudicial allegations of prior violations contained in the basic trial information. See State v. Blood, 360 N.W.2d 820, 823 (Iowa 1985).
In these circumstances the allegations in a trial information that charge prior violations for punishment enhancement purposes do not constitute elements of the crime. See State v. Robinson, 165 N.W.2d 802, 804 (Iowa 1969); State v. Wessling, 260 Iowa 1244, 1261-62, 150 N.W.2d 301, 311 (1967); State v. Biggins, 245 Iowa 903, 906-07, 63 N.W.2d 292, 294 (1954). Thus, the information should not be vulnerable to a dismissal for the inclusion of an unavailable prior violation.
What we wrote in State v. Ridout, 346 N.W.2d 837, 838-39 (Iowa 1984), is relevant here. That case antedated the Iowa Code section 321.281 amendment. The trial information charged third offense OWI. Trial court sustained defendant's motion to dismiss the information on the ground one of the violations was a deferred judgment. We there stated:
We believe nonetheless the motion to dismiss should have been overruled because the number of defendant's previous offenses is not an element of the current OWI charge, but goes instead only to the penalty once defendant is found guilty. . . .
Because the facts are undisputed, trial court might have treated the motion for dismissal as a motion for adjudication of law points, [State v.] Wilt, 333 N.W.2d [457,] at 460 [(Iowa 1983)], and then determined whether the deferred sentence could be used under the provisions of rule 6(5), Iowa Rules of Criminal Procedure, to enhance punishment. If it could not be employed for that purpose, the court might have ordered the information amended.
Where, however, a charge has been dismissed erroneously before defendant has been placed in jeopardy, the State may appeal, and, if successful, may continue prosecution under the information filed. State v. Edwards, 279 N.W.2d 9, 10 (Iowa 1979). Upon remand, of course, the information filed in this case may be amended to conform to the balance of the trial court's ruling and to this opinion. We therefore reverse the district court's dismissal of the trial information.
Ridout, 346 N.W.2d at 838-39.
As in Ridout, we hold the State in this case had a right to appeal the dismissal of the trial information, and we do have jurisdiction *652 in this appeal. We thus confront the merits of this controversy.
II. This dispute arises out of the 1984 legislation that amended Iowa Code section 321.281 by adding:
For the purpose of determining if a violation charged is a second, third, or subsequent offense, a deferred judgment pursuant to section 907.3 for an offense under this section shall be counted as a previous violation.
1984 Iowa Acts ch. 1292, § 4(2)(c) (codified at Iowa Code § 321.281(2)(c) (1985)).
We agree with the State that in these circumstances this enactment does not operate as an ex post facto clause. A statute violates the ex post facto clause only when it "punishes as a crime an act previously committed, which was innocent when done, which makes more burdensome the punishment for a crime, after its commission, or which deprives one charged with crime of any defense available according to law at the time when the act was committed." Beazell v. State, 269 U.S. 167, 169-70, 46 S.Ct. 68, 68, 70 L.Ed. 216, 217 (1925); State v. Anderson, 338 N.W.2d 372, 375 (Iowa 1983). The enhanced punishment in these situations is not for the first offense, but for the second. See, e.g., Oliver v. United States, 290 F.2d 255, 256 (8th Cir.1961) (per curiam); State v. Norris, 203 Iowa 327, 328-29, 210 N.W. 922, 923 (1926); State v. Dowden, 137 Iowa 573, 576, 115 N.W. 211, 212 (1908). Our inquiry does not end, however, with our conclusion there is no ex post facto violation.
The key consideration in our analysis is legislative intent. Because nothing in the language of the above amendment furnishes guidance whether preamendment deferred judgments are to be counted, we necessarily must look to other principles in our resolution of this issue.
We start from the premise that we are considering a penal statute, which of course must be construed strictly with doubts being resolved in favor of the accused. Ridout, 346 N.W.2d at 840; City of Cedar Falls v. Flett, 330 N.W.2d 251, 254 (Iowa 1983).
A second consideration must be the unique nature of a "deferred judgment," authorization for which is currently found in Iowa Code section 907.3. In reality, when as here the conditions of probation are fulfilled, a "deferred judgment" is not a judgment at all. Iowa Code section 907.3 provides that "[u]pon fulfillment of the conditions of probation, the defendant shall be discharged without entry of judgment." (Emphasis added.) "The manifest purpose of the deferred sentence procedure is to permit a defendant to avoid otherwise inevitable conviction and a judicial record of the criminal charge...." State v. Farmer, 234 N.W.2d 89, 92 (Iowa 1975) (emphasis added). Upon a defendant's discharge from probation the court's criminal record with reference to the proceeding must be expunged. Iowa Code § 907.9 (1983); Farmer, 234 N.W.2d at 92. The only retained record relating to the proceeding is the confidential deferred judgment docket maintained by the state court administrator. Iowa Code § 907.4 (1983). Because no judgment is entered in these cases, defendant has no right of appeal and even the possibility of appeal is extinguished upon successful completion of the probation. State v. Anderson, 246 N.W.2d 277, 279 (Iowa 1976); see McKeever v. Gerard, 368 N.W.2d 116, 118 (Iowa 1985).
Thus prior to the effective date of the 1984 amendment to Iowa Code section 321.281, a defendant consenting to a deferred judgment not only was assured that upon completion of probation he or she would have no "record," but more specifically, a "deferred sentence" would not be an "offense" for the purposes of imposing enhanced punishment in prosecutions for OWI. Ridout, 346 N.W.2d at 839-40; see State v. Clark, 351 N.W.2d 532, 537 (Iowa 1984). After such case and statutory law assurances, leading accused persons to consent to deferred judgments, it would be straining logic to conclude the legislature *653 intended by the amendment to retroactively count such prior proceedings in the enhanced punishment equation.
Finally, we turn to the legislature's statutory guidelines for construction of statutes, and specifically Iowa Code section 4.13,[3] which relevantly provides:
The ... amendment ... of a statute does not affect:
....
2. Any ... right, privilege ... previously acquired, accrued, accorded, or incurred thereunder.
If by consenting to the deferred judgment procedure defendant acquired a right or privilege not to have that procedure used at a later date to enhance punishment under Iowa Code section 321.281(2)(c), the 1984 amendment could not take that right or privilege away.
Our law indicates that a defendant is, in certain circumstances, entitled to a deferred judgment. See State v. Wright, 340 N.W.2d 590, 594 (Iowa 1983) ("[Defendant] certainly did not establish entitlement to a deferred judgment as a matter of law."). It is one of the "sentencing" options under Iowa Code section 901.5 that can be imposed "in the discretion of the court." Iowa Code § 901.5 (1983). That discretion, however, is not unlimited. State v. Messer, 306 N.W.2d 731, 732 (Iowa 1981). The district court's determination may be reviewed for abuse of discretion, and cases in which trial courts have denied deferred sentences have been reversed to allow consideration of other factors. State v. Hildebrand, 280 N.W.2d 393, 397 (Iowa 1979); State v. Kelley, 357 N.W.2d 638, 640 (Iowa Ct.App.1984).
Because it is possible to be entitled to a deferred judgment, an accused must also be entitled to the benefits of that deferred judgment. In 1980, one of those benefits was the absence of any possibility the judgment could be used later to enhance Iowa Code section 321.281 punishment for a second offense OWI. Ridout, 346 N.W.2d at 839-40. It follows that application of the 1984 Iowa Code section 321.281(2)(c) amendment to this defendant would violate Iowa Code section 4.13(2) by taking from him a benefit he acquired or a right he was accorded under a previous statute.[4]
We thus agree with trial court's resolution of the underlying question, but reverse its ruling dismissing the second offense OWI trial information. We remand for further district court proceedings in conformance with Ridout and with this opinion.
REVERSED AND REMANDED WITH DIRECTIONS.
NOTES
[1]  The second offense charge was based on defendant's prior plea of guilty to OWI on July 16, 1980, for which defendant received a deferred judgment.
[2]  This rule provides in relevant part:

A supplemental indictment shall be prepared for the purposes of trial of the facts of the current offense only, and shall satisfy all pertinent requirements of the Code, except it shall make no mention, directly or indirectly, of the allegation of the prior convictions, and shall be the only indictment read or otherwise presented to the jury prior to conviction of the current offense.
Iowa R.Crim.P. 6(5).
[3]  We have stated the purpose of such provisions is to save accrued rights and commenced proceedings from destruction by intervening legislative action. In re Estate of Hoover, 251 N.W.2d 529, 531 (Iowa 1977).
[4]  This determination is not inconsistent with State v. Blood, 360 N.W.2d 820 (Iowa 1985), which involved revocation of driver's privileges. As we pointed out in Blood, there is a significant difference in purpose between Iowa Code section 321.281(2), which prescribes the punishment for OWI offenses, and subsection 321.281(9)(a), which triggers a court order directing an administrative agency to revoke a defendant's driving privilege. Id. at 822. Such a revocation is not designed for punishment, but for the protection of the public in the use of the highways. Id. In contrast to the present criminal case, no statute or case law antedating the amendment identified a right, accorded to an OWI defendant, not to have a deferred judgment counted as a "violation" in what is essentially a civil proceeding to insure the public's protection on the highways.
