The dispositive issue in this appeal is whether the intended aggregate sentence imposed by the trial court or the mittimus controls an incarcerated person’s total effective sentence. The plaintiff in error, the commissioner of correction (commissioner), brings a writ of error challenging the decision of the habeas court, Sferrazza, J., that reduced the total aggregate sentence of the defendant in error, Horatio Gordon (petitioner), from fifteen to thirteen years imprisonment. We reverse the decision of the habeas court.
It is undisputed that, on February 3,1986, the state and the petitioner reached a plea agreement whereby the petitioner pleaded guilty under the Alford1 doctrine to separate counts of attempted murder, robbery in the first degree and criminal possession of a revolver in violation of General Statutes §§ 53a-49 and 53a-54a (a), 53a-134 (a) (2) and 53a-217 (a), respectively.2 The parties agreed upon a total aggregate sentence of fifteen years imprisonment.
*386On March 14,1986, the date of sentencing, the trial court, Landau, J., accepted the state’s recommendation and imposed the agreed upon sentence. The petitioner concurred in the recommendation. The trial court thereupon sentenced the petitioner as follows: (1) on the charge of attempted murder, thirteen years imprisonment; (2) on the charge of criminal possession of a revolver, two years imprisonment consecutive to the attempted murder count; and (3) on the charge of robbery in the first degree, ten years imprisonment “concurrent with the other counts.”3 (Emphasis added.) During the plea canvass, the trial court stated to the petitioner: “Mr. Gordon, having entered your plea of guilty to the charge(s), you understand there is an agreed stipulated sentence of fifteen years as a total effective sentence.” The petitioner responded: “Yes.”4 The petitioner did not challenge any aspect of this sentence on direct appeal.
The petitioner thereafter was committed to the custody of the commissioner under the authority of a judgment mittimus. Unfortunately, the mittimus listed the *387counts in an order reverse to that stated by the trial court in its imposition of sentence. Apparently as a result, and notwithstanding the unambiguous sentence imposed by the trial court, the mittimus stated the following: “On 1st count—5 yrs. may not be suspended or reduced On 2nd count—sentence may not be suspended or reduced 1st count to run concurrent with other counts; 2nd count to run concurrent with 1st count and consecutive with 3rd count 3rd count to run concurrent to 1st count and consecutive to 2nd count.”5 (Emphasis added.)
Thereafter, the petitioner filed a petition for a writ of habeas corpus in the judicial district of Tolland challenging the legality of his sentence.6 On the basis of the defective mittimus, the petitioner argued to the habeas court that he had received both a concurrent and a consecutive sentence for the count of criminal possession of a revolver. The effect, the petitioner claimed, was that he had been sentenced to four years for that charge rather than the two years for which he had plea bargained.
After a hearing, the habeas court acknowledged that the trial court had intended to impose an aggregate sentence of fifteen years, but nonetheless concluded that “[t]he aggregate of the individual sentences actually imposed conflicted with that intent.”7 The habeas court agreed with the petitioner that the aggregate sentence *388was a “mathematical impossibility” because, in its interpretation of the sentence, “the two year term [ran] both consecutive to the thirteen year term and concurrent to the ten year term which is itself concurrent to the thirteen year term.” The habeas court reasoned that the ten year term, as imposed, was concurrent with both the thirteen and two year terms individually. As a result, it held that, pursuant to General Statutes § 53a-38 (b) (l),8 the two year sentence was absorbed within the ten year sentence making the total effective sentence thirteen instead of fifteen years.9 The habeas court then ordered the aggregate sentence reduced accordingly.
Thereafter, on September 17,1992, the habeas court denied the commissioner’s petition for certification from its ruling, and on September 24, 1992, the commissioner filed the present writ of error pursuant to Practice Book § 4143. On November 10,1992, the commissioner filed a motion for articulation of the habeas court’s decision. After the habeas court denied that motion, we granted the commissioner’s motion for review. The habeas court filed its memorandum of articulation in support of its judgment on January 11,1993. We now reverse the order of the habeas court.
Habeas corpus relief is generally reserved for those cases in which the petitioner has satisfied the heavy burden of proving that there has been a great miscar*389riage of justice or other prejudice. Kuhlmann v. Wilson, 477 U.S. 436, 447, 106 S. Ct. 2616, 91 L. Ed. 2d 364 (1986); Lozada v. Warden, 223 Conn. 834, 840, 613 A.2d 818 (1992); Safford v. Warden, 223 Conn. 180, 191 n.13, 612 A.2d 1161 (1992); Lubesky v. Bronson, 213 Conn. 97, 110, 566 A.2d 688 (1989); D’Amico v. Warden, 193 Conn. 144, 156-57, 476 A.2d 543 (1984). While states commonly recognize habeas corpus as a means to obtain relief from an illegal sentence; see, e.g., People v. Craft, 41 Cal. 3d 554, 715 P.2d 585, 224 Cal. Rptr. 626 (1986); People ex rel. Harper v. Brantley, 34 Ill. App. 3d 807, 341 N.E.2d 126 (1975); Hern v. State, 849 S.W.2d 924 (Tex. App. 1993); “a collateral attack is not a vehicle by which the . . . judge may for other reasons reduce a sentence.” 3 W. LaFave & J. Israel, Criminal Procedure (1984) § 25.2, p. 133; see also United States v. Addonizio, 442 U.S. 178, 99 S. Ct. 2235, 60 L. Ed. 2d 805 (1979).
In the present case there was no illegal sentence or other miscarriage of justice for the habeas court to correct. The trial court properly sentenced the petitioner to a total effective sentence of fifteen years. It is clear from the record, as the habeas court acknowledged, that the trial court unambiguously intended an aggregate sentence of fifteen years. After careful review of the transcript of the trial court’s sentence, we discern no impropriety in the manner by which that total effective sentence was either determined or imposed.
Multiple sentences imposed on a person run consecutively or concurrently with respect to each other in the manner directed by the court at the time of sentencing. General Statutes § 53a-37. In the present case, the trial court first sentenced the petitioner to thirteen years imprisonment for the crime of attempted murder. The trial court then sentenced the petitioner to two years imprisonment for the crime of criminal pos*390session of a revolver. At this point, the trial court stated that the two year sentence was to be served consecutively to the thirteen year sentence resulting in an aggregate term of fifteen years.10 The trial court then sentenced the petitioner to ten years imprisonment for the crime of robbery in the first degree to be served concurrently to the sentence imposed for the first two counts thereby merging the ten year term into the fifteen year term.11 It was the trial court’s clear intention, therefore, that the ten year term was to be served concurrently to the fifteen year aggregate term to which the petitioner had already been sentenced resulting in a total effective sentence of fifteen years in the state prison.12 It is that intention that controls. State v. Chicano, 216 Conn. 699, 712-14, 584 A.2d 425 (1990), cert. denied, 501 U.S. 1254, 111 S. Ct. 2898, 115 L. Ed. 2d 1002 (1991).
The confusion, therefore, is caused by the judgment mittimus, which failed to reflect the sentencing court’s order, language and intent. As a result, the petitioner argued to the habeas court that the sentence expressed in the mittimus would cause him to serve the two year term for criminal possession of a revolver, and on that basis the habeas court reduced the total effective sentence to thirteen years. It is noteworthy that, in this case, all of the parties including the habeas court conceded that the mittimus was defective.13 The defect, *391however, is of little import because where the unambiguous intention of a sentencing court’s legal sentence conflicts with the wording of the judgment mittimus we conclude that the latter is preempted by the former. Id.
Historically, in English criminal practice a mittimus was a written order issued from a court or magistrate that directed a sheriff to deliver a person named therein to a specific jailer to be safely held until such time as a court of general or limited jurisdiction permitted the person to be released. See State v. Maier, 13 N. J. 235, 248-49, 99 A.2d 21 (1953); see also Tuttle v. Lang, 100 Me. 123, 127, 60 A. 892 (1905). A mittimus, then, was in a true sense a judicial warrant. See 1 J. Archbold, Criminal Procedure, Pleading and Practice (8th Ed. 1877) pp. 149-52; see also Saunders v. United States, 73 F. 782, 786 (C.C.D. Me. 1896).
Today, the mittimus has come to be regarded only as a clerical document that is certified by the clerk of the court. United States ex rel. Chasteen v. Denemark, 138 F.2d 289, 291 (7th Cir. 1943). In an early case, the Hawaii Supreme Court succinctly asserted that the mittimus was but a “process” and that “[i]n cases where full light is not afforded by the mittimus . . . resort may be had to the record itself to ascertain what the sentence of the Court was.” In re Rhodus, 6 Haw. 343, 344 (1882). More recently, the Illinois Supreme Court stated that “[a] mittimus is only a transcript of the minutes of the conviction and sentence duly certified by the clerk. The clerk has no power to control the effect *392of the sentence of the court by changing the time of the issuing of the mittimus. To determine which sentence shall be served first and whether one shall succeed the other is clearly a judicial act, which neither the clerk nor sheriff has power to perform.” People ex rel. Clancy v. Graydon, 329 Ill. 398, 401,160 N.E. 748 (1928).
Connecticut, as well, has long regarded the mittimus merely as a clerical document by virtue of which a person is transported to and rightly held in prison. See Payton v. Albert, 209 Conn. 23, 30 n.7, 547 A.2d 1 (1988); State v. Lenihan, 151 Conn. 552, 554-55, 200 A.2d 476 (1964); Redway v. Walker, 132 Conn. 300, 303, 43 A.2d 748 (1945). “We have observed that a mittimus after conviction in a criminal case is similar to an execution after judgment in a civil case; it is final process and carries into effect the judgment of the court.” Alexander v. Robinson, 185 Conn. 540, 547, 441 A.2d 166 (1981). If the judgment of the court and the language of the mittimus conflict, the judgment prevails because the prisoner is not detained by virtue of the warrant of commitment, but on account of the judgment and sentence. Hill v. Wampler, 298 U.S. 460, 465, 56 S. Ct. 760, 80 L. Ed. 1283 (1936); see also Reed v. Reincke, 158 Conn. 45, 47, 255 A.2d 850 (1969). We conclude, therefore, that if the judgment is valid, the confinement of the prisoner in accordance with the judgment cures any defect in the mittimus. See United States ex rel. Jackson v. Ragen, 150 F.2d 190, 191 (7th Cir. 1945).
A court on appeal has the inherent authority to remand a case to the trial court for a corrective resentence. See State v. Hanson, 210 Conn. 519, 531, 556 A.2d 1007 (1989) (remand for resentencing where the trial court was unaware that it had discretion to impose a suspended sentence); see also State v. Dennis, 30 Conn. App. 416, 426, 621 A.2d 292, cert. denied, 226 *393Conn. 901, 625 A.2d 1376 (1993) (remand to trial court to correct several defects regarding the imposition of certain consecutive and concurrent sentences). In the present case, although we conclude that there is no illegality or other impropriety apparent in the sentence imposed by the trial court, we must direct correction of the mittimus so that it comports with the trial court’s unambiguous judgment of conviction.
The judgment of the habeas court is reversed and the case is remanded to that court with direction to deny the petition for a writ of habeas corpus and to order that the mittimus be corrected to reflect accurately the sentence imposed by the trial court.
In this opinion the other justices concurred.