Warren Stang seeks a writ of certiorari directed to the Circuit Court for the Tenth Judicial Circuit, which denied his petition for writ of habeas corpus. Stang contends that he is being illegally detained in the Tenth Judicial Circuit under a sentencing order that is void. Because the attachments to Stang’s petition show that the sentencing order is void, we treat Stang’s petition as a petition for writ of habeas corpus, grant it, and order his release.
Stang initially pleaded guilty in January 2000 to twenty-four various white-collar offenses that occurred between 1991 and 1994. He was sentenced to five years in prison for fifteen of the counts, to run concurrently and with credit for time served, followed by three years of probation for the remaining nine counts, also to run concurrently. After serving his time in prison, Stang was released to probation, which he subsequently violated. The sentencing order on the violation of probation, dated March 30, 2005, imposed a combination of concurrent and consecutive sentences on the pending nine counts that totaled twenty-seven years. However, the order also granted Stang 1915 days’ credit for time served and indicated that the credit was to be applied against each count. The practical effect of this sentenc *568 ing order was that Stang would serve about two months in prison and then be released with no further supervision.
On April 21, 2005, Stang appealed the revocation of his probation to the Fourth District Court of Appeal. While this direct appeal was pending, Stang was transferred to the custody of the Department of Corrections. When the Department saw the March 30, 2005, sentencing order, it was “confused.” Thus, on June 6, 2005, with no notice to Stang, his counsel, or the State, the Department faxed a letter to “Ana” at the Palm Beach County Clerk of Court. The fax attached the two-page sentencing order from March 30, 2005, and noted that page two of the sentencing order allowed Stang credit for “1,915 days ‘plus’ the original county jail time and time served in the department’s custody from [sic] counts 1 thru 3, 8, 30, 33, 34, 37, 39, 42, 51, 56, 60, 62 and 64, in accordance with Tripp v. State.” The fax also noted that awarding this credit “would result in a potential immediate release.” Therefore, the Department requested that the court “clarify” Stang’s sentence within three working days.
Apparently in response to this letter, on June 7, 2005, the trial court entered an “amended” sentence that gave Stang a total of 1915 days’ credit against his entire sentence. This amendment meant that Stang would serve approximately twenty-two years in prison, rather than approximately two months. Neither Stang nor his counsel were given notice of this “re-sentencing,” and the “amended” sentence was not provided to Stang, his counsel, or the State. This “amended” sentence was entered sixty-nine days after Stang was sentenced for the violation of probation and while Stang’s direct appeal of that sentence was pending.
Stang first learned of the existence of this “amended” sentencing order when he questioned the Department about his release date. The Department told Stang that he had been awarded 1915 days’ credit against his total sentence, not each count, and it provided him with the “amended” sentence. When Stang attempted to address the issue of which sentence should be enforced — the original or the “amended” — through the prison grievance system, he was told that the Department was required to enforce the “amended” sentence and that it had no authority to disregard that sentence.
Stang also attempted to address the enforceability of the “amended” sentence through the court system. In a motion filed pursuant to Florida Rule of Criminal Procedure 3.850, Stang argued that the “jail time served” award in the “amended” sentence was incorrect and contrary to the sentence imposed when he entered his admission to the violation of his probation.
See Stang v. State,
Stang did not appeal the denial of this postconviction motion. Instead, on June 26, 2008, he filed a petition for writ of habeas corpus with the Tenth Judicial Circuit arguing that the “amended” sentence *569 was void because it was rendered during the pendency of his direct appeal. He also argued that entry of the “amended” sentence violated his due process rights because neither he nor his counsel were given notice of the court’s intent to amend his sentence nor was he given the opportunity to be present when his sentence was amended. Finally, he argued that because his original sentence was not illegal and because the sixty-day period for modifying a sentence under rule 3.800(c) had expired, the trial court had no jurisdiction to “correct” any error in his sentence on the sixty-ninth day. Stang asserted that the initial legally imposed sentence had long since expired and that he was entitled to immediate release. The postconviction court denied Stang’s habeas petition, finding that his claims had been “addressed appropriately at the administrative level.” Stang then sought review of that ruling by seeking a writ of certiorari in this court.
As an initial matter, we treat Stang’s petition for writ of certiorari as a petition for writ of habeas corpus because Stang is seeking his immediate release from custody. Florida Rule of Appellate Procedure 9.040(c) provides that “[i]f a party seeks an improper remedy, the cause shall be treated as if the proper remedy had been sought.” Because Stang is seeking his immediate release from prison based on an allegedly void sentencing order, his petition for writ of certiorari should be treated as a petition for writ of habeas corpus.
Turning to the merits, we note that this court’s jurisdiction to consider Stang’s habeas petition is quite limited. While Stang was convicted and sentenced in Palm Beach County, a county not within the territorial jurisdiction of this court, this court nevertheless has jurisdiction to review the sentencing order because Stang is currently assigned to the Hardee Correctional Institution, which is within the territorial jurisdiction of this court.
See Alachua Reg’l Juvenile Det. Ctr. v. T.O.,
Here, our review of the record reveals that the detention order under which Stang is being held is void and illegal for several reasons. First, the trial court had no jurisdiction to “amend” Stang’s sentence during the pendency of his direct appeal in the absence of a proper motion filed pursuant to Florida Rule of Criminal Procedure 3.800(b)(2). Florida Rule of Appellate Procedure 9.600(d) provides that a trial court retains jurisdiction during the pendency of an appeal in a criminal case to consider only motions filed pursuant to rule 3.800(b)(2) and motions addressed to post-trial release pursuant to rule 9.140(h).
Cf. Brown v. State,
*570 Here, Stang’s sentence was not “amended” pursuant to any motion filed under rule 3.800(b)(2). Clearly Stang did not file such a motion, and the State could not have properly filed such a motion since rule 3.800(b) permits the State to seek relief “only if the correction of the sentencing error would benefit the defendant or ... correct a scrivener’s error.” Nothing in the record indicates that the error in question was simply a scrivener’s error, nor has the State ever asserted so in any of its filings with the postconviction court, the Fourth District, or in this appeal. Accordingly, pursuant to rule 9.600(d), the trial court was without jurisdiction to enter the “amended” sentence, and the “amended” sentence is therefore void and unenforceable.
Second, the “amended” sentence was entered in violation of Stang’s due process rights. A defendant has a due process right to be present at any sentencing or resentencing hearing at which judicial discretion will be exercised.
See, e.g., Griffin v. State,
Third, the “amended” sentence violated Stang’s double jeopardy rights. This court and others have repeatedly held that a trial court may not rescind jail credit that was previously awarded, even if the initial award was improper, because such an action violates double jeopardy.
See, e.g., Lebron v. State,
Because the “amended” sentencing order under which the Department is holding Stang is void and illegal, it is unenforceable. Under these circumstances, Stang can be legally held pursuant only to the original sentence imposed on March 30, 2005-not the June 7, 2005, “amended” sentence. Since the sentence imposed on *571 March 30, 2005, expired years ago, Stang is entitled to immediate release.
Petition for writ of habeas corpus granted.
