
889 A.2d 672 (2005)
Michael C. BLACK, Petitioner
v.
PENNSYLVANIA DEPARTMENT OF CORRECTIONS, Respondent.
Commonwealth Court of Pennsylvania.
Submitted on Briefs November 23, 2005.
Decided December 29, 2005.
*673 Michael C. Black, petitioner, pro se.
Timothy A. Holmes, Asst. Counsel, and Michael A. Farnan, Chief Counsel, Camp Hill, for respondent.
BEFORE: PELLEGRINI, Judge, FRIEDMAN, Judge, and McCLOSKEY, Senior Judge.
OPINION BY Judge PELLEGRINI.
Before this Court is the preliminary objection in the nature of a demurrer filed by the Department of Corrections (Department) in response to a pro se petition for review in the nature of mandamus filed by Michael C. Black (Black) seeking credit for 727 days served against his modified revocation sentence.
Black is currently incarcerated at the State Correctional Institute at Mahanoy (SCI-Mahanoy). He was charged with aggravated indecent assault, a felony of the second degree, with a statutory maximum of 10 years. 18 Pa.C.S. § 106(b)(3); 18 Pa.C.S. § 3125(c)(1). On March 16, 1998, pursuant to a negotiated plea agreement, Black received a split sentence  a sentence of a single charge that is split between a period of incarceration followed by probation. In his case, the period of incarceration was one year less a day to two years less a day with three years of probation for the charge of aggravated indecent assault. 18 Pa.C.S. § 3125(a)(8) (Original *674 Sentence).[1] On July 9, 2002, because of parole violations, Black he was resentenced by the Court of Common Pleas of Lancaster County (trial court) to two and one-half to five years. (Original VOP Sentence) and purportedly was credited by the trial judge for serving 800 days from his Original Sentence.[2]
On April 20, 2005, almost three years after the Original VOP Sentence was imposed, the Department's Records Office telephoned the Lancaster County Probation and Parole Office and questioned why Black was receiving credit for the 800 days against his Original VOP Sentence that he served against his Original Sentence. After reviewing Black's credit, the Lancaster County Probation and Parole Office determined that the credit was awarded in error and the trial judge agreed. A new commitment order was issued for Black's Original VOP Sentence, only crediting him for the time he served from April 27, 2002 to July 9, 2002 (73 days), the period of time he was incarcerated pending his probation revocation proceedings (Modified VOP Sentence).
After exhausting his administrative remedies through the Department's grievance process, Black filed a petition for review in the nature of mandamus[3] in this Court's original jurisdiction requesting that the Department credit his Modified VOP Sentence by 727 days. Black contends that he is entitled to the 727 days credit, and to rule otherwise would be a violation of the double jeopardy clause of the Fifth Amendment of the U.S. Constitution. Black also argues the trial judge violated his due process rights by modifying his Original VOP Sentence three years after the sentence was handed down in violation of 42 Pa.C.S. § 5505.[4] Based on our Supreme Court's decision in McCray, and our decision in Aviles v. Department of Corrections, 875 A.2d 1209 (Pa.Cmwlth. 2005), the Department contends that time served against an original charge can never be credited against a VOP sentence and filed a preliminary objection in the nature of a demurrer contending that Black's petition for review be dismissed with prejudice for failure to state a claim upon which relief can be granted.[5]
*675 In McCray, McCray received a split sentence; 11½ to 23 months (credit for time already served) followed by 10 years probation. He was immediately paroled. He subsequently violated his probation and received a sentence of incarceration for that violation. Through mandamus, McCray sought credit toward his new violation of probation sentence for time served on the original 11½ to 23 month portion of his sentence. Overruling our decision that McCray was entitled to such credit, our Supreme Court held that there was no clear right to mandamus credit relief where the combined total confinement components of original and violation of probation sentences did not exceed the legal maximum for the crimes committed. See Commonwealth v. Bowser, 783 A.2d 348 (Pa.Super.2001) (defendant, who received a split sentence of incarceration followed by probation and later had probation revoked and received a new incarceration sentence for violation of parole, was not entitled to credit towards the new period of incarceration for time serving the first sentence of incarceration); cf. Commonwealth v. Williams, 443 Pa.Super. 479, 662 A.2d 658 (1995) (defendant, who received a split sentence of incarceration followed by probation and later had probation revoked and received a new sentence of incarceration, and was entitled to credit because the new period of incarceration resulted in a period of incarceration that exceeded the statutory maximum, rendering the sentence illegal). McCray's holding, though, involved a procedural issue of whether mandamus was available in this Court. Our Supreme Court held "that McCray should have expressed his concerns about this matter by raising an objection [to the sentencing court], which would have allowed the trial court to clarify its decision. This would also have preserved the issue for appellate review. Instead, McCray failed to avail himself of the remedy available to him." McCray, 582 Pa. at 449, 872 A.2d at 1132.
Since McCray, we have decided Aviles v. Department of Corrections, supra. In Aviles, the defendant initially received a split sentence and subsequently violated his probation. His re-sentence was also split. Thereafter, he violated his probation again and, as a result, the sentencing judge imposed a three to six year sentence of incarceration "including credit for time served." The defendant sought to have his latest sentence credited with all the time he spent serving the other sentences, but that request was denied. In denying the defendant's mandamus action, we explained as follows:
Similar to the situation in McCray, Aviles lacks a clear right to the credit he seeks. The trial court originally convicted Aviles on a drug charge punishable by up to 15 years in prison. See Section 13(f)(1) of the Controlled Substance, Drug, Device and Cosmetic Act;B0055;B0055. The original sentence contained a total confinement component of up to 23 months. Thereafter, the first [violation of probation, or VOP] sentence contained a total confinement component of up to 23 months. Then, the second VOP sentence contained a total confinement component of up to six *676 years. The combined total confinement components of all his sentences for this crime are less than 10 years, well within the statutory maximum. As in McCray and Bowser, concerns about the imposition of an illegal sentence are simply not present here. As in McCray, Aviles lacks a clear right to the credit he seeks.
Id. at 1213. Because McCray discussed our Superior Court decision in Bowser that a defendant was not entitled as a matter of right to credit for past due periods, we interpreted that in Aviles to mean that the trial court had already taken into consideration any time served prior to a violation of probation and had included that in the determination of the VOP sentence; in other words, the VOP sentence was the sentence unless the sentencing court wants to five double credit, and if so, it must say so.
More recently, though, our Superior Court has addressed this issue again in Commonwealth v. Yakell, 876 A.2d 1040 (Pa.Super.2005), giving direction to sentencing courts as to whether back-time is to be awarded. In that case, Yakell pled guilty to one count of driving under the influence, his third offense, graded as a misdemeanor of the first degree, and driving during suspension, DUI related, and he was sentenced to a term of imprisonment of 3 to 18 months followed by 12 months of probation with a credit of 86 days for time served. Following his release on parole, Yakell pled guilty to a new charge in the State of Ohio, and his parole and probation for his DUI conviction were revoked. While the sentencing court noted that Yakell was entitled to credit for time served on the prior portion of his sentence, it appears that the court only gave him credit for part of the time served. Yakell then filed for relief under the Post Conviction Relief Act (PCRA)[6] contending that he was entitled to credit for all the time that he served.
The Superior Court noted that whether credit should be given centered around the effect of 42 Pa.C.S. § 9760(1) which requires the sentencing court to give credit "against the maximum term and any minimum term ... for all time spent in custody as a result of the criminal charge for which a prison sentence is imposed or as a result of the conduct on which such a charge is based." It further noted that it had interpreted this provision in both Williams and Bowser stating:
The question, however, is what the sentencing court actually intended to do in this case. The practical applications of Williams and Bowser are not necessarily clear in the best of circumstances. And, neither Williams nor Bowser is entirely on point in the instant matter. Though Williams seems to espouse the view that § 9760 requires credit for time served to be given in circumstances such as this, and even more so when not crediting the time would render a sentence illegal, no concerns of an illegal sentence are implicated here, where appellant's original sentence and new sentence, combined, fall below the statutory maximum. At the same time, although Bowser embraces the position that § 9760 does not require a double credit for time served to be given in matters such as this, particularly when the original and new sentences combined are below the statutory maximum, unlike the situation in Bowser, no clear double counting of time served is involved in the instant matter.
Yakell, 876 A.2d at 1043. After remanding to the trial court to clarify whether it wanted to award credit for time served against the VOP sentence and that credit *677 under 42 Pa.C.S. § 9760 was discretionary, the Superior Court went on to state that:
In the future, in order to prevent confusion such as happened in this matter, the trial court, when re-sentencing after revocation of parole or probation, should state on the record whether or not the new sentence is inclusive of the original sentence and formulate and furnish the new sentence accordingly.
Id. at 1044. When a sentencing court follows the Superior Court's suggestion by making an order that is clear, whether the new sentence is inclusive or not of the original sentence, mandamus would then be available to an inmate to have the Department carry out that clear direction. That is not the case here, though.
In this case, Black's contention is that the Department, without notice to him, initiated a procedure that resulted in the issuance of the Modified VOP Sentence by the sentencing judge that increased his sentence by 727 days and took back credit that was given to him in his Original VOP Sentence. He contends that the trial court was without jurisdiction to change his sentence because the modified VOP order was issued well past the 30 days provided to the trial court in which it may amend an order, that the Department has a ministerial duty to only incarcerate him for the length of the Original Sentence and his mandamus claim should not be dismissed.[7] While we are troubled that the Department, without notice, can initiate a proceeding that leads to an order that extends incarceration for 727 days because it was done by order of the sentencing judge, mandamus is not available since the Department is now required to follow the Modified VOP Sentence until it is reversed. To challenge that order, Black is required to either take measures to perfect the appeal of that order to the Superior Court or seek relief through the PCRA arguing that the trial court lacked jurisdiction to change the order. Commonwealth v. Quinlan, 433 Pa.Super. 111, 639 A.2d 1235, 1238 (1994) ("As well, 42 Pa.C.S. § 9543, which defines the eligibility requirements for PCRA relief, provides that a person may be eligible for PCRA relief if a sentence results from a proceeding in a tribunal without jurisdiction. 42 Pa.C.S. § 9543(a)(2)(viii)").[8]
Accordingly, we sustain the Department's preliminary objection in the nature of demurrer, and we dismiss Black's petition for review.

ORDER
AND NOW, this 29th day of December, 2005, the preliminary objection in the nature of demurrer filed by the Department of Corrections is sustained, and the petition for review filed by Michael C. Black is dismissed.
NOTES
[1]  Black was sentenced to an additional two years of probation for the charge of indecent assault. 18 Pa.C.S. § 3126(a)(8). This period of probation does not appear to be at issue.
[2]  The times for which Black received credit were from March 12, 1997 to August 19, 1997; October 20, 1997 to March 31, 1998; December 2, 1998 to December 18, 1998; February 26, 1999 to March 26, 1999; November 28, 1999 to January 27, 2000; April 17, 2000 to April 27, 2000; July 24, 2000 to August 28, 2000; September 27, 2000 to December 1, 2000; May 26, 2001 to December 3, 2001; and April 27, 2002 to July 9, 2002. This information was contained in the "Court Commitment" form, apparently prepared by the Clerk of Courts of Lancaster County. None of the trial court's orders have been attached by either party to their pleadings.
[3]  A proceeding in mandamus is an extraordinary action at common law and is available only to compel the performance of a ministerial act or mandatory duty where there exists no other adequate and appropriate remedy; there is a clear legal right in the plaintiff and a corresponding duty in the defendant. Jackson v. Vaughn, 565 Pa. 601, 777 A.2d 436 (2001). Where the actions of the Department in computing an inmate's maximum and minimum dates of confinement are being challenged, an action for mandamus remains viable as a means for examining whether statutory requirements have been met. McCray v. Pennsylvania Department of Corrections, 582 Pa. 440, 872 A.2d 1127 (2005).
[4]  42 Pa.C.S. § 5505 provides as follows: "Except as otherwise provided or prescribed by law, a court upon notice to the parties may modify or rescind any order within 30 days after its entry, notwithstanding the prior termination of any term of court, if no appeal from such order has been taken or allowed."
[5]  In ruling on a demurrer, we must accept as true all well-pled material allegations in the petition for review, as well as all inferences reasonably deducible from the allegations. To sustain a demurrer, it must appear with certainty the law will not permit recovery; any doubt must be resolved by a refusal to sustain the demurrer. Kretchmar v. Commonwealth, 831 A.2d 793 (Pa.Cmwlth.2003), petition for allowance of appeal denied, 577 Pa. 728, 847 A.2d 1289 (2004).
[6]  42 Pa.C.S. §§ 9541-9546.
[7]  42 Pa.C.S. § 5505 provides that "[e]xcept as otherwise provided or prescribed by law, a court upon notice to the parties may modify or rescind any order within 30 days after its entry, notwithstanding the prior termination of any term of court, if no appeal from such order has been taken or allowed." A "trial court lacks jurisdiction to modify a sentence once the thirty day period for filing an appeal has passed." Commonwealth v. Martin, 346 Pa.Super. 129, 499 A.2d 344, 353 (1985) (citing Commonwealth v. Lynch, 304 Pa.Super. 248, 450 A.2d 664 (1982)).
[8]  Quinlan provides an excellent summary of the law concerning the time limits for a trial court to amend a sentence and exception to correct for an illegality of the sentence or obvious clerical errors.
