
636 N.W.2d 12 (2001)
STATE of Iowa, Appellee,
v.
Sherry Kay KRESS, Appellant.
No. 00-1173.
Supreme Court of Iowa.
November 15, 2001.
*15 Linda Del Gallo, State Appellate Defender, and Patricia Reynolds, Assistant State Appellate Defender, for appellant.
Thomas J. Miller, Attorney General, Jean C. Pettinger, Assistant Attorney General, Richard R. Phillips, County Attorney, and Dana Christensen, Assistant County Attorney, for appellee.
LAVORATO, Chief Justice.
The defendant, Sherry Kay Kress, appeals from her conviction and sentence upon her guilty plea to procurement of a prescription drug by forgery. She contends that her counsel was ineffective in permitting her to enter a guilty plea and failing to file a motion in arrest of judgment because the district court misinformed her concerning the application of Iowa Code section 124.413 (1999) (minimum sentence provision). She also asserts the district court erred in imposing the one-third mandatory minimum sentence under section 124.413. We find no error in the court's ruling on section 124.413 imposing the mandatory minimum sentence. However, because we conclude Kress has established her ineffective-assistance-of-counsel claim, we vacate her conviction and sentence and remand for further proceedings.

I. Background Facts and Proceedings.
On February 16, 2000, Kress presented a prescription for two drugsPrecose and Ritalinto a pharmacist at Drug Town Pharmacy in Muscatine, Iowa. Ritalin is a schedule II controlled substance. See Iowa Code § 124.206(4)(d). The pharmacist noticed that the prescription appeared altered. He checked with the office of the physician whose name appeared on the prescription. In doing so, the pharmacist discovered that the physician had not signed the prescription and that Kress had only been prescribed Precose. A licensed physician's assistant in the physician's office had actually written the prescription for the drug Precose. The physician's assistant was not legally authorized to prescribe Ritalin.
The pharmacist gave Kress a bottle with only two Ritalin pills (even though the prescription was for ninety) and called the police, who investigated the incident. As a result of the investigation, the State charged Kress with procurement of a prescription drug by forgery. See Iowa Code § 155A.23(1)(b) (providing that a person shall not "[o]btain or attempt to obtain a prescription drug ... by ... [f]orgery or *16 alteration of a prescription or any written order"), (4) (providing that a person shall not "[m]ake or utter any false or forged prescription or written order"). The State also charged that on April 1, 1997, Kress had been convicted of possession of a controlled substance with intent to deliver, a class "C" felony.
On May 26, District Judge James R. Havercamp took Kress's plea of guilty. The judge told Kress that she would have to serve a minimum period of confinement equal to one-third of the maximum indeterminate sentence prescribed by the Iowa Code, unless the sentencing court waived the one-third requirement. In addition, the judge told Kress that, because of her prior conviction, the sentencing court would also have the discretion to impose up to three times the maximum sentence. The judge made clear that he was not telling Kress what her sentence would be, but rather what her sentence could be. After the attorneys advised the court that there was no plea agreement, the judge told Kress that the sentencing judge could impose any punishment authorized by law.
Neither Kress nor her attorney objected to or otherwise questioned the judge's explanation of the possible punishments. After acknowledging she understood these possibilities, Kress pleaded guilty. She admitted that she had someone alter the prescription by adding the drug, Ritalin. She also admitted the prior drug conviction.
Dr. James Yeltatzie, one of Kress's treating doctors, wrote a letter to Kress's attorney two months before the plea proceedings. The letter helps explain the circumstances surrounding the incident. Dr. Yeltatzie wrote that Kress had been taking Ritalin, but that he had discontinued Ritalin and changed her medication to Adderal. The doctor explained that Adderal is actually stronger than Ritalin in controlling attention difficulties and problems with concentration. He further explained that Kress was not aware of this and began to panic because she did not have any Ritalin. The doctor concluded his letter, stating that he
would hope that the courts would be able to take into consideration her mental status, her sense of panic and the fact that I already [had] written for a stronger medication for her to receive, yet she could only focus on the fact that she did not have any Ritalin and this was very bothersome to her.
The record shows that Kress is afflicted with a number of health problems and is on numerous medications. Ironically, following the incident giving rise to the criminal charges, Kress's doctor decided that Adderal was not effective and once again prescribed Ritalin.
On July 7, District Judge David E. Schoenthaler sentenced Kress. The judge refused to enhance the sentence because of the prior conviction, waived any mandatory minimum requirements applicable to the sentence, and imposed an indeterminate ten-year sentence. The judge also assessed a $1000 fine and suspended Kress's driver's license for 180 days.
Minutes later, Judge Schoenthaler reopened the record. The judge explained that he had no discretion to waive the one-third mandatory minimum sentence and deleted that provision from his sentencing order. Neither Kress nor her attorney objected. Nor did either file a motion in arrest of judgment challenging the validity of the plea.

II. Issues.
On appeal, Kress contends that her trial counsel was ineffective on two grounds. First, he failed to object during the plea proceedings after the district court improperly *17 informed Kress of the range of possible punishments. Second, he failed to file a motion in arrest of judgment to challenge the plea or otherwise object to the correction of the sentence once the court discovered its sentencing error. She asserts that her counsel's failures were prejudicial because they resulted in a plea that was neither knowingly made nor voluntary. She asks us to set aside her conviction and sentence and remand the case for further proceedings.
In the alternative, Kress contends the district court incorrectly concluded that the mandatory minimum applied in this case. She asks us to vacate her sentence and remand the case for resentencing. We address the latter claim first.

III. One-third Mandatory Minimum Claim.
A. Error preservation and scope of review. As mentioned, Kress contends she was not subject to the one-third mandatory minimum sentence found in Iowa Code section 124.413. If she is correct, the sentence is illegal. An illegal sentence
is one that is not permitted by statute. An illegal sentence is void and "not subject to the usual concepts of waiver, whether from a failure to seek review or other omissions of error preservation." Because an illegal sentence is void, it can be corrected at any time.
State v. Woody, 613 N.W.2d 215, 217 (Iowa 2000) (quoting State v. Ohnmacht, 342 N.W.2d 838, 842, 843 (Iowa 1983)) (citations omitted).
Because Kress's contention raises a question of statutory interpretation, our review is for correction of errors at law. State v. Ceron, 573 N.W.2d 587, 589 (Iowa 1997).
B. Analysis. Iowa Code section 155A.23(1)(b) provides:
A person shall not ... [o]btain or attempt to obtain a prescription drug or procure or attempt to procure the administration of a prescription drug by... [f]orgery or alteration of a prescription or of any written order.
Iowa Code section 155A.23(4) provides:
A person shall not ... [m]ake or utter any false or forged prescription or written order.
If the prescription drug is a controlled substance, Iowa Code sections 124.401(1) and 124.411 control the punishment of those who violate section 155A.23. See Iowa Code § 155A.24. As mentioned, the prescription drug here was Ritalin, also known as Methylphenidate, a schedule II controlled substance. See Iowa Code § 124.206(4)(d).
A violation of section 124.401(1) (prohibiting manufacture, delivery, or possession with intent to manufacture or deliver a controlled substance) is a class "C" felony, punishable by up to ten years imprisonment and a fine of up to $50,000. See Iowa Code §§ 124.401(1)(c)(8), 902.9(3).
Section 124.411(1) provides additional penalties for second or subsequent offenses:
Any person convicted of a second or subsequent offense under this chapter, may be punished by imprisonment for a period not to exceed three times the term otherwise authorized, or fined not more than three times the amount otherwise authorized, or punished by both such imprisonment and fine.
Iowa Code § 124.411(1).
Section 124.413 provides the following mandatory minimum sentence for certain offenders:
A person sentenced pursuant to section 124.401, subsection 1, paragraph "a ", "b ", "c ", "e ", or "f " , shall not be eligible *18 for parole until the person has served a minimum period of confinement of one-third of the maximum indeterminate sentence prescribed by law.
Iowa Code § 124.413. We have held that this provision means what it says: A person subject to section 124.413 is not eligible for parole until that person has served the minimum period of confinement specified. Luter v. State, 343 N.W.2d 490, 492 (Iowa 1984); State v. Morehouse, 316 N.W.2d 884, 886 (Iowa 1982).
After this court decided Luter and Morehouse, the legislature passed legislation providing that the application of section 124.413 is not mandatory in all cases. 1985 Iowa Acts ch. 41, § 1 (codified at Iowa Code § 901.10 (1999)) (providing that when sentencing for a first conviction under section 124.413, court has discretion to impose a sentence less than provided by statute if mitigating circumstances exist and are stated on the record); State v. Thomas, 547 N.W.2d 223, 225-26 (Iowa 1996). Because of Kress's previous conviction of possession with intent to deliver, the section 124.413 mandatory minimum sentencing requirement would apply if we determine it is applicable in this case. See Luter, 343 N.W.2d at 492; Morehouse, 316 N.W.2d at 886.
The district court sentenced Kress pursuant to section 124.401(1)(c). Although it could have, the court did not impose the section 124.411(1) triple enhancement for repeat offenders. However, the court did apply the section 124.413 mandatory minimum sentence.
As mentioned, section 155A.24 provides that a person who violates the provisions of section 155A.23 "shall be punished pursuant to section 124.401, subsection 1, and section 124.411" if the drug involved is a controlled substance. See Iowa Code § 155A.24. Kress argues the legislature's failure to refer to the one-third mandatory minimum of section 124.413 in section 155A.24 makes the mandatory minimum sentencing requirement inapplicable to violations of section 155A.23. If the legislature had intended for the mandatory minimum sentencing requirement to apply to violations of section 155A.23, Kress argues, it would have referred to section 124.413 in section 155A.24.
In countering these arguments, the State points to the differences in the language of sections 124.413 and 124.411. Section 124.411 applies to persons "convicted of a second or subsequent offense under this chapter." Iowa Code § 124.411 (emphasis added). Because of the quoted language, the State argues that section 124.411 would not apply to violations of section 155A.23 without a specific reference in section 155A.24 to section 124.411. In contrast, the State further argues, section 124.413 applies to a "person sentenced pursuant to" certain provisions of section 124.401(1). Iowa Code § 124.413 (emphasis added). Because Kress was sentenced pursuant to provisions of section 124.401(1), the State concludes, she meets the criteria required for application of the one-third mandatory minimum sentence found in section 124.413.
We agree with the State. A person who violates a provision of section 155A.23 "shall be punished pursuant" to section 124.401(1). See Iowa Code § 155A.24. A person "sentenced pursuant to" section 124.401(1)(c) must serve the one-third mandatory minimum sentence. See Iowa Code § 124.413. The language of these statutes makes clear that Kress, "punished pursuant to" section 124.401(1) and "sentenced pursuant to" section 124.401(1)(c), is subject to the section 124.413 mandatory minimum sentence requirement. See State v. Rodgers, 560 N.W.2d 585, 586 (Iowa 1997) (noting that we apply statutes according to their terms). Because of the *19 clear relationship between sections 124.401(1) and 124.413 found in the language of those sections, there was no need for the legislature to include a reference to section 124.413 in section 155A.24.
We think the legislature intended the same penalties for violations under Iowa Code chapter 155A and Iowa Code chapter 124 when controlled substances are involved. More specifically, the legislature intended equivalent punishment for those convicted of manufacture, delivery, or procurement of controlled substances by forgery, fraud, or deceit. In plain language, the legislature tied those violations of chapter 155A relating to controlled substances to chapter 124. It would indeed seem absurd and inconsistent with this intent to apply the section 124.411 triple enhancement to violations under chapter 155A without also applying the section 124.413 mandatory minimum sentence. See State v. Byers, 456 N.W.2d 917, 919 (Iowa 1990) (noting that court seeks a "reasonable interpretation that will best effect the legislative purpose and avoid absurd results"). We conclude the plain language of section 124.413 ties it to violations of section 124.401, and that connection renders section 124.413 applicable to violations of chapter 155A.
The district court did not err in applying the section 124.413 one-third mandatory minimum sentence to this case.

IV. Ineffective Assistance of Counsel.
Kress argues her counsel rendered ineffective assistance for two reasons. First, he failed to ensure the court properly followed Iowa Rule of Criminal Procedure 8(2)(b) (providing that court in taking a plea must inform defendant of several matters). Second, he failed to file a motion in arrest of judgment challenging the plea or otherwise object to the correction of the sentence once the sentencing court discovered its sentencing error. Kress further argues that her counsel's failures were prejudicial because they resulted in a plea that was neither knowing nor voluntary. For reasons that follow, we agree with all of these contentions.
A. Error preservation and scope of review. Iowa Rule of Criminal Procedure 23(3)(a) requires a defendant to file a motion in arrest of judgment if the defendant desires to challenge the adequacy of a guilty plea proceeding on appeal. We read rule 23(3)(a) in conjunction with Iowa Rule of Criminal Procedure 8(2)(d). State v. Boone, 298 N.W.2d 335, 337 (Iowa 1980). Rule 8(2)(d) requires the court to inform a defendant that the defendant's failure to file a motion in arrest of judgment will preclude the defendant from challenging defects in a guilty plea proceeding on appeal.
Kress does not contend the district court failed to inform her of the necessity to file a motion in arrest of judgment to preserve her challenge to the validity of the plea proceedings. Additionally, the record is clear that Kress did not challenge the validity of her plea by motion in arrest of judgment. However, the rule 23(3)(a) bar does not apply here because of Kress's claim that her counsel's ineffective assistance resulted in her failure to file the motion. See State v. Hildebrant, 405 N.W.2d 839, 840 (Iowa 1987) (failure to file motion in arrest of judgment due to the ineffective assistance of counsel did not preclude appellate review of defendant's contention there was no factual basis for guilty plea).
Because ineffective-assistance-of-counsel claims raise issues under the Sixth Amendment to the Federal Constitution, our review is de novo. State v. Gant, 597 N.W.2d 501, 504 (Iowa 1999).
*20 B. Elements of ineffective-assistance-of-counsel claim. To establish her claim of ineffective assistance of counsel, Kress must show that her trial counsel failed to perform an essential duty and that this failure resulted in prejudice. Id. Kress must prove both elements by a preponderance of evidence. Id. If either element is absent, we affirm. Id.
As to the first element, Kress "must prove [her] trial counsel's performance was not within the normal range of competence." Id. We measure the attorney's performance by standards of reasonableness consistent with " `prevailing professional norms.' " Ledezma v. State, 626 N.W.2d 134, 142 (Iowa 2001) (quoting Strickland v. Washington, 466 U.S. 668, 688, 104 S.Ct. 2052, 2065, 80 L.Ed.2d 674, 694 (1984)).
At the outset, we presume competency and we avoid second-guessing and hindsight. Id. "Miscalculated trial strategies and mere mistakes in judgment normally do not rise to the level of ineffective assistance of counsel." Id. at 143. In a guilty-plea case, the defendant must show that counsel's advice was not within the normal range of competency demanded of attorneys in criminal cases. Mott v. State, 407 N.W.2d 581, 582 (Iowa 1987).
To establish the second element, Kress "must prove [her] counsel's error resulted in an actual and substantial disadvantage, creating a reasonable probability that but for the error the outcome of the proceeding would have been different." Gant, 597 N.W.2d at 504. " `A reasonable probability is a probability sufficient to undermine confidence in the outcome.' " Ledezma, 626 N.W.2d at 143 (quoting Strickland, 466 U.S. at 694, 104 S.Ct. at 2068, 80 L.Ed.2d at 698).

C. Analysis.
1. Iowa Code section 124.413a sentencing provision. Kress characterizes section 124.413 as a sentencing provision. This is contrary to the holding of several cases. These cases hold that section 124.413 is not a sentencing provision but rather a limitation on eligibility of parole. Kinnersley v. State 494 N.W.2d 698, 700 (Iowa 1993); Luter, 343 N.W.2d at 492; Morehouse, 316 N.W.2d at 886. For reasons that follow, we agree with Kress that section 124.413 is a sentencing provision. We overrule Kinnersley, Luter, and Morehouse to the extent they hold otherwise.
In determining whether section 124.413 is a sentencing provision, we search for an interpretation that reflects legislative intent. See State v. Iowa Dist. Ct. for Monroe County, 630 N.W.2d 778, 781 (Iowa 2001). In searching for that intent, we consider statutes in context and harmonize them with related statutes. State v. Casey's Gen. Stores, Inc., 587 N.W.2d 599, 601 (Iowa 1998).
The language in Iowa Code section 901.10 gives a clue as to what was the legislature's intent regarding the nature of section 124.413. In section 901.10, a court "sentencing " a defendant "under section... 124.413" has discretion to "sentence the person to a term less than provided by the statute [section 124.413]...." Iowa Code § 901.10(1) (emphasis added). In section 901.10(2), the legislature limits the court's ability to grant a "reduction of sentence" in certain cases. Id. § 901.10(2) (emphasis added). This last provision refers to the requirements of section 124.413 repeatedly as a "mandatory minimum sentence." Id.
The legislature's choice of title for section 901.10 also throws light on the legislature's intent regarding the nature of section 124.413. See Iowa Dist. Ct. for *21 Monroe County, 630 N.W.2d at 781 (stating that the title of a statute may be considered in determining legislative intent). Originally, section 901.10 was entitled "imposition of mandatory minimum sentences," and the act was described as one "relating to the imposition of mandatory minimum sentences." 1985 Iowa Acts ch. 41 (emphasis added). In 1999, the legislature amended section 901.10 by adding another subsection. 1999 Iowa Acts ch. 12, § 14. This amendment also changed the title of the section to "reduction of sentences." Id.(emphasis added).
In addition to the terminology the legislature chose, the statutory scheme for implementation of section 124.413 indicates it is a sentencing provision. Significantly, section 901.10 gives the court, rather than the parole board, the express power to determine the application of section 124.413. That the court determines such application makes clear that section 124.413 is a sentencing statute. See generally State v. Iowa Dist. Ct. for Black Hawk County, 616 N.W.2d 575, 578 (Iowa 2000) (stating that the sentencing of a defendant "is an independent function that is the sole province of the judiciary").
The mere fact that section 124.413 refers to parole eligibility does not make the statute one that limits the parole board. It is a sentencing statute as evidenced by the power given to the court to determine its applicability. The impact on parole is incidentalan impact that occurs in every case where a mandatory minimum sentence is imposed. 2. Trial counsel'sineffectiveness regarding the guilty plea and the motion in arrest of judgment. To the extent Kress alleges the district court failed to inform her fully of the consequences of her plea, she implicates the Due Process Clause of the Fourteenth Amendment to the Federal Constitution. State v. Carney, 584 N.W.2d 907, 908 (Iowa 1998). A guilty plea results in a waiver of several constitutional rights. Boone, 298 N.W.2d at 337. For the waiver to be valid, there must be an intentional relinquishment of known rights. Id. Due process therefore requires that a defendant enter a guilty plea voluntarily and intelligently. Id. To enter a guilty plea voluntarily and intelligently means the defendant has a full understanding of the consequences of a plea. Id.
Iowa Rule of Criminal Procedure 8(2)(b) governs the acceptance of guilty pleas. Substantialnot strictcompliance with the rule is all that is required. State v. Kirchoff, 452 N.W.2d 801, 804 (Iowa 1990).
Under rule 8(2)(b), we must find that Kress entered her plea "intelligently in the sense that [she] had been informed of, and understood, the matters listed in rule 8(2)(b)." Id. at 805. Among other things, the court must inform the defendant of and determine that the defendant understands "[t]he mandatory minimum punishment, if any, and the maximum possible punishment provided by the statute defining the offense to which the plea is offered." Iowa R.Crim. P. 8(2)(b)(2). Failure to substantially comply with rule 8(2)(b) renders the plea involuntary. State v. White, 587 N.W.2d 240, 246 (Iowa 1998). In such circumstances, the remedy is to set aside the conviction and sentence and allow the defendant to plead anew. State v. Fluhr, 287 N.W.2d 857, 868-69 (Iowa 1980).
Because section 124.413 is a sentencing provision, the district court had the obligation to inform Kress, under rule 8(2)(b), of the one-third mandatory minimum sentence. Before accepting Kress's plea, the court misinformed her that the *22 sentencing court could waive the one-third mandatory minimum sentencing requirement in section 124.413. This was tantamount to a failure to advise her of the maximum possible punishment under that provision. Kress's trial counsel neither corrected the misinformation nor filed a motion in arrest of judgment raising the issue. Such failure "does not involve trial tactics, strategies, or other judgment calls that we do not ordinarily second-guess. Rather, it concerns counsel's legal misadvice resulting from his unfamiliarity with and failure to research applicable statutory provisions" that would make clear the one-third mandatory minimum sentence applied. Meier v. State, 337 N.W.2d 204, 206-07 (Iowa 1983) (citation omitted). That placed counsel below the range of normal competency in his representation of Kress. See id. at 207.
Turning to the prejudice element, we think the prejudice results from what Kress relinquished. Id. at 208. Kress "had an unqualified constitutional right to a trial on the issue of [her] guilt, which she [may have] abandoned on the strength of [the court's misinformation]." Id. We do not speculate on the outcome of the trial waived by her guilty plea. Id. As mentioned, the remedy called for in these circumstances is to set aside the conviction and sentence and allow the defendant to plead anew.

V. Disposition.
Because we conclude the one-third mandatory sentencing requirement in section 124.413 applied in Kress's case, the district court committed no error in imposing it. However, because we find Kress has established her ineffective-assistance-of-counsel claim regarding the guilty plea and the motion in arrest of judgment, we vacate Kress's conviction and sentence and remand for further proceedings to allow her to plead anew.
CONVICTION AND SENTENCE VACATED; CASE REMANDED WITH DIRECTIONS.
