
148 Ariz. 62 (1985)
712 P.2d 975
STATE of Arizona, Respondent,
v.
Robert Lewis DAVIS, Petitioner.
No. 1 CA-CR 9345-PR.
Court of Appeals of Arizona, Division 1, Department D.
December 24, 1985.
*63 John Verkamp, Coconino Co. Atty. by Richard Palmatier Jr., Deputy Co. Atty., for respondent.
Aspey, Watkins & Diesel by Donald H. Bayles, Jr., Flagstaff, for petitioner.
OPINION
SHELLEY, Judge.
Petitioner was sentenced in Arizona to a term of imprisonment of 20 to 25 years on June 14, 1976. Pursuant to the court's judgment, petitioner was transported to the Texas Department of Corrections facility at Huntsville, where he was permitted to serve this sentence concurrently with a Texas sentence. He received an absolute discharge from the Texas prison sentence on August 8, 1980 and returned to his home in Marshall, Texas. When petitioner was released, the Arizona Department of Corrections failed to make any arrangements to transport him to the State of Arizona to serve the balance of the Arizona sentence. On July 2, 1981, the Arizona Department of Corrections realized that it had failed to obtain custody of petitioner and requested the Coconino County Attorney to have petitioner brought back before the court.
On July 28, 1981, the Coconino County Attorney filed a request for a bench warrant for the petitioner. A bench warrant was issued on May 13, 1982.
On January 16, 1984, the Coconino County Attorney requested an order to show cause why the petitioner should not be placed in physical custody of the Arizona Department of Corrections. A hearing was held on March 9, 1984 and a bench warrant issued for the arrest of petitioner on that date. On March 25, 1984, the petitioner was arrested in Texas and transported to the Arizona Department of Corrections where he has since remained in custody.
On July 27, 1984, petitioner filed a petition for post-conviction relief arguing that under McKellar v. Arizona State Department of Corrections, 115 Ariz. 591, 566 P.2d 1337 (1977), he was entitled to credit for the time spent out of prison while living in Marshall, Texas. The petition for post-conviction relief was considered by the court and on September 26, 1984, the Arizona Department of Corrections was ordered to give petitioner credit from August 8, 1980 to the time he was re-incarcerated. The court found that the Arizona Department of Corrections was at fault in failing to arrange for the return of the petitioner to the State of Arizona at the time he was released from incarceration in Texas.
On April 2, 1985 petitioner filed a second petition for post-conviction relief requesting the court to order the Department of Corrections to re-compute his release and parole eligibility dates. The exhibits introduced showed that upon his original commitment in 1976 to the Department of Corrections petitioner was eligible for parole as of April 22, 1984, was to receive a maximum expiration of sentence date of December 22, 1986, and a mandatory release date of June 22, 1986. Following the trial judge's order, noted above, the Department of Corrections re-computed petitioner's time, giving him credit for the time he was out of custody. The Department changed the maximum release date to June 23, 1989 and the mandatory release date to December 23, 1988. In re-computing the release dates, the Department of Corrections refused to take into account earned time credits because the petitioner was not in custody.[1] Petitioner argues that the effect *64 of the Department's decision was to punish him for the mistake made by the Department of Corrections by unnecessarily lengthening his prison sentence. He argues that the trial court's previous order and McKellar forbid this result and that he is entitled to the benefit of earned time credits because of the state's error in failing to keep him in custody.
The state asserts that no good time credits were earned during the nearly four years petitioner was not imprisoned because A.R.S. § 31-251 does not apply to prisoners not under the control of the State of Arizona. Relying on Jones v. State ex rel. Eyman, 19 Ariz. App. 26, 504 P.2d 949 (1972) and Walsh v. State ex rel. Eyman, 104 Ariz. 202, 450 P.2d 392 (1969), the state argues that good time credits are applied only to time spent "in custody." We think the state's conclusion ignores the specific holding in McKellar that:
The state's error must not, however, work to appellant's further detriment since he was in no way at fault. He shall be credited with the time he was illegally paroled toward the mandatory five years.
115 Ariz. at 594, 566 P.2d at 1340.
Although the court in McKellar had no occasion to deal with the application of earned credits because it was dealing with a mandatory minimum five-year sentence, we hold that the rationale of that case is broad enough to apply to the facts in this case.
The issue raised in this petition for post-conviction relief requires, first, a consideration of whether this court should consider this matter pursuant to Rule 32, Arizona Rules of Criminal Procedure.
APPLICABILITY OF RULE 32
Even assuming this court were to accept petitioner's position that he is entitled to good time credits, the earliest date for release by this petitioner would be in June 1986. He asks only that the Department of Corrections be required to give him "credits" for time not served in the Arizona State Prison. In State v. Manning, 143 Ariz. 139, 692 P.2d 318 (App. 1984), a petitioner sought relief pursuant to Rule 32 to challenge a parole revocation hearing. This court noted that a petitioner must comply strictly with Rule 32 by asserting substantive grounds which bring him within the provisions of the rule in order to be entitled to any relief. Id. at 141, 692 P.2d at 320. The court went on to hold that this court has no jurisdiction to rule on the merits of a petition for post-conviction review where no ground cognizable under Rule 32 is asserted. Id. The "Comment" to Rule 32.1(d) states:
This paragraph is not intended to include attacks on the conditions of imprisonment or on correctional practices or prison rules.
Paragraph (d) is intended to include claims of more traditional types  e.g., miscalculation of sentence, unlawful revocation of probation or parole, questions of computation of good time  which result in the defendant's remaining in custody when he should be free. (Emphasis added.)
A.R.S. Anno., Vol. 17, 1973 ed. at 692.
We think the clear import of Rule 32.1(d) and the "Comment" thereto is to the effect that mere challenges to the Department of Corrections' computation of good time credit are not cognizable under Rule 32 unless they result in the defendant remaining in custody when he should otherwise be free. As noted above, even were we to accept the petitioner's claim, he would not be entitled to be released from imprisonment.
However, even though a petitioner is not entitled to relief by writ of habeas corpus, an avenue of collateral relief intended to be encompassed within Rule 32, Arizona Rules of Criminal Procedure, it has been held that where relief may be granted by extraordinary writ (special action), this court may grant the appropriate relief even though the writ applied for or the motion made is *65 not aptly titled. Brown v. State, 117 Ariz. 476, 477, 573 P.2d 876, 877 (1978). Although habeas corpus is not an appropriate remedy to attack executive discretion, it is not inappropriate to construe such a petition as a petition for special action. Peru v. Raines, 130 Ariz. 44, 633 P.2d 453 (App. 1981). See also, Pickett v. Boykin, 118 Ariz. 261, 576 P.2d 120 (1978) (habeas corpus was not proper remedy to require a sheriff to allow petitioner two-for-one time, but court would treat the petition as one asking for relief by special action).
The court should look to the substance of the petitions or motions and not merely to their form. Brown v. State, id. Clearly, this court has jurisdiction to consider an appeal from a special proceeding commenced in a superior court. A.R.S. § 12-2101. Under the circumstances, we will consider this as an appeal from a denial of special action relief in the trial court.
APPLICATION OF GOOD TIME CREDITS
In McKellar v. Arizona State Department of Corrections, 115 Ariz. 591, 566 P.2d 1337 (1977), appellant was granted parole by the Board of Pardons and Parole pursuant to an incorrect computation of the date on which he would be eligible for parole. Appellant returned home and generally conducted himself as a model parolee for 2 1/2 months. Id. at 592, 566 P.2d at 1338. The mistake in his eligibility for parole was then discovered and he was returned to custody. Relying on White v. Pearlman, 42 F.2d 788 (10th Cir.1930), the court held that the state's error could not work a further detriment against appellant and he was credited with the time he was illegally paroled toward the mandatory five-year sentence. 115 Ariz. at 594, 566 P.2d at 1340.
In the recent case of Giles v. State, 462 So.2d 1063, 1064 (Ala.Cr.App. 1985), which also relied on White v. Pearlman, supra, the court held that the trial court had erred in summarily dismissing a petition seeking habeas corpus relief on facts very similar to those in this case. In Giles the appellant was released from prison on January 20, 1978. He remained at liberty until August 1982, at which time he was arrested and returned to the state prison system to serve a fifteen-year sentence. Appellant argued that he was entitled to full credit against any unexpired portion of his sentence for four years, seven months and one day, plus accumulated good time credit which, taken together, entitled him to immediate release from imprisonment. The court held that a writ of habeas corpus was proper when a party was entitled to discharge from a state prison. The court found that the holding in White v. Pearlman, supra, supported the petitioner's position that where the defendant was unquestionably without fault in his erroneous release from custody, he is entitled to credit for all of the time he has been released. Although not specifically addressed in the opinion, the court's conclusion that appellant would be entitled to habeas corpus relief appeared to accept as true the claim that accumulated good time credits for the four years that appellant was out of prison should be considered.
The "good time" and "double time" provisions of former A.R.S. §§ 31-251 and 31-252 were amended in 1983, a substantial period of time after petitioner was sentenced and were applicable to prisoners held in the custody of another state pursuant to an extradition agreement. Walsh v. State ex rel. Eyman, 104 Ariz. 202, 450 P.2d 392 (1969). The credits provided for in those two statutes are matters of statutory right, State v. Rice, 110 Ariz. 210, 213, 516 P.2d 1222, 1225 (1973), and may only be forfeited in accordance with the provisions of those statutes. For example, in A.R.S. § 31-251, a prisoner could lose the credits by engaging in assaults endangering the lives of persons at a prison or is guilty of a flagrant disregard of the rules. The credits may be forfeited after notice to the offender and proof of the offense, but the credits cannot be taken away where there was no violence or "evil" intent to violate the rules. A.R.S. § 31-252 permitted a forfeiture of double time credits where there *66 had been a breach of trust upon the recommendation of the director of the department. The substance of these statutes is now contained in A.R.S. §§ 41-1604.06 and 41-1604.07.
Under Sections 251(A) and 252(A) prior to amendment, credits could only be forfeited when the inmate had committed an offense with "violence or evil intent," or when there had been a breach of trust. State v. Valenzuela, 144 Ariz. 43, 46, 695 P.2d 732, 735 (1985). Here, it is clear that no case is alleged or could be made against petitioner for having committed any offenses or for having committed a breach of trust at the prison during the four years that he was free. It is true that McKellar did not deal with good behavior and double time credits. In that case, the court was dealing solely with the release of a defendant prior to completion of his mandatory sentence to which such credits could not apply. However, the reasoning in McKellar is equally applicable here. The hiatus between petitioner's release from incarceration in Texas and his re-incarceration in Arizona pursuant to the Arizona sentence was the fault of the Department of Corrections and not of the petitioner. The State by this error cannot cause the petitioner to lose what was rightfully his under statutory and case law. There is no presumption that petitioner would have lost his right to any of the credits had he been promptly returned from Texas. To hold otherwise would allow the State's error to work to the petitioner's further detriment contrary to the ruling in McKellar.
We hold that the petitioner is entitled to all of the good behavior and double time credits to which he would have been entitled had the Department of Corrections promptly returned him to the State of Arizona. The order of the trial court is set aside and the trial court is directed to order the Department of Corrections to compute credits for the petitioner as required by this opinion.
GRANT, P.J., and JACOBSON, J., concur.
NOTES
[1]  See former A.R.S. §§ 31-251, 31-252, 41-1604.06-07. (A.R.S. § 31-251 was substantially amended by Laws 1977, Ch. 142 and A.R.S. § 31-252 was repealed by Laws 1977, Ch. 142, § 182.)
