Felipe Alfaro Rico (“defendant”) appeals from (1) a judgment entered upon his guilty plea to voluntary manslaughter and (2) an order denying his motion for appropriate relief (“MAR”). We vacate defendant’s judgment and the order denying his MAR and remand for resentencing.
I. Background
On 29 September 2008, defendant was indicted in Sampson County Superior Court on the charge of first degree murder for the shooting death of Mario Alberto Rivera-Juarez. On 9 July 2008, the State served defendant’s counsel with notice of its intention to prove the existence of the aggravating factor that defendant used a deadly weapon at the time of his alleged crime.
On 1 October 2008, the State and defendant entered into a plea agreement whereby defendant agreed to plead guilty to the lesser offense of voluntary manslaughter and admit to the aggravating factor in exchange for a dismissal of the first degree murder charge. *111Under the terms of the agreement, defendant also agreed to “receive an active sentence of not less than 84 months nor more than 110 months in the NC Dept, of Corrections.” Defendant stipulated that he had three prior convictions and that he was a prior record level II offender for felony structured sentencing purposes. Under the sentencing grid that was in effect at the time defendant committed his offense, defendant’s agreed upon sentence was in the aggravated range.
Judge W. Russell Duke, Jr., accepted defendant’s guilty plea and entered a judgment sentencing defendant to a minimum of 84 months to a maximum of 110 months in the North Carolina Department of Correction. The judgment indicated that the sentence was in the presumptive range and was imposed “pursuant to a plea arrangement as to sentence under Article 58 of G.S. Chapter 15A.” Judge Duke stated that he made no findings regarding any aggravating or mitigating factors “because the prison term imposed is pursuant to a plea arrangement.” In addition, Judge Duke recommended that defendant pay restitution in the amount of $5,052.75.
On 31 August 2009, defendant filed a pro se MAR in Sampson County Superior Court. In the MAR, defendant argued, inter alia, that the State improperly sentenced him in the aggravated range. Defendant moved for a new sentencing hearing and the appointment of counsel to assist him in pursuing his MAR.
Judge Russell J. Lanier, Jr. reviewed defendant’s motion and his court file. Judge Lanier determined that an evidentiary hearing was unnecessary. On 19 March 2010, Judge Lanier entered an order which denied defendant’s MAR. The order concluded that defendant’s judgment contained a clerical error because it imposed an aggravated sentence without the finding of an aggravating factor. Judge Lanier then entered an amended judgment which included a finding that defendant used a deadly weapon at the time of the offense based upon the terms of the plea agreement and defendant’s colloquy with Judge Duke. The amended judgment was otherwise essentially the same as the original judgment, as it sentenced defendant to a an active term of 84 to 110 months and recommended the same amount of restitution.
On 18 May 2010, defendant filed a pro se petition for writ of certiorari to this Court, seeking review of Judge Lanier’s order denying his MAR and the amended judgment. This Court granted defendant’s petition on 1 June 2010.
*112II. Motion for Appropriate Relief
Defendant argues, and the State concedes, that the trial court erred by denying his MAR. Specifically, defendant contends that Judge Duke’s imposition of an aggravated sentence was improper. We agree.
The imposition of an aggravated sentence is governed by the Structured Sentencing Act, and the Act contains multiple requirements which must be met before an aggravated sentence can be imposed. First, “Structured Sentencing provides specifically and without exception that a trial court must make written findings when deviating from the presumptive sentence . . . .” State v. Bright, 135 N.C. App. 381, 383, 520 S.E.2d 138, 140 (1999). In addition, “[o]nce the trial court f[inds] aggravating and mitigating factors, it [i]s required to weigh them pursuant to N.C. Gen. Stat. 15A-1340.16(b).” State v. Gillespie,_N.C. App._,_, 707 S.E.2d 712, 715 (2011). Even in cases where only aggravating factors are present, as in the instant case, N.C. Gen. Stat. § 15A-1340.16(b) does not mandate that the trial court sentence a defendant in the aggravated range. Instead, the statute states that “[i]f aggravating factors are present and the court determines they are sufficient to outweigh any mitigating factors that are present, it may impose a sentence that is permitted by the aggravated range.” N.C. Gen. Stat. § 15A-1340.16(b) (2011)(emphasis added). Thus, the determination of whether an aggravated sentence is appropriate rests solely within the sound discretion of the sentencing judge. See Gillespie,_N.C. App. at_, 707 S.E.2d at 714.
A. The Initial Judgment
In the instant case, defendant, pursuant to a plea agreement with the State, pled guilty to voluntary manslaughter, admitted the existence of the aggravating factor that he used a deadly weapon at the time of the crime, and agreed to the imposition of a sentence which was in the aggravated range. At sentencing, Judge Duke conducted a colloquy with defendant in which defendant admitted the aggravating factor in compliance with N.C. Gen. Stat. § 15A-1022.1 (2011) and then imposed an aggravated sentence.
However, Judge Duke failed to make the required findings of any aggravating factors and also failed to exercise his discretion in determining whether an aggravated sentence was appropriate. At defend ant’s sentencing hearing, Judge Duke stated that he made no findings because “the prison term imposed is pursuant to a plea arrangement.” The judgment entered by Judge Duke also indicated that defendant’s *113sentence was imposed “as a plea arrangement as to sentence” under N.C. Gen. Stat. § 15A-1023 (2011).
This Court has previously stated that the presence of a plea agreement as to sentence does not vitiate the trial court’s duty to make written findings when deviating from the presumptive sentencing range under the Structured Sentencing Act. See Bright, 135 N.C. App. at 382-83, 520 S.E.2d at 139. Likewise, there is nothing in N.C. Gen. Stat. § 15A-1340.16 which would permit a sentencing judge, when presented with a plea agreement, to forego the exercise of his discretion in determining whether an aggravated sentence is appropriate.
Since the judgment entered by Judge Duke did not include the required findings to support an aggravated sentence and the record reflects that Judge Duke failed to exercise his discretion in determining whether an aggravated sentence was appropriate, defendant’s sentence was invalid as a matter of law.
B. The Amended Judgment
In his order denying defendant’s MAR, Judge Lanier indicated that Judge Duke’s errors were merely clerical and attempted to correct defendant’s judgment by adding the required finding of an aggravating factor in an amended judgment. However,
in the exercise of power to amend the record of a court, the court is only authorized to make the record correspond to the actual facts and cannot, under the guise of an amendment of its records, correct a judicial error or incorporate anything in the minutes except a recital of what actually occurred.
State v. Bullock, 183 N.C. App. 594, 600, 645 S.E.2d 402, 406 (2007). In the instant case, we have already determined that Judge Duke’s failure to make any findings or exercise any discretion when imposing defendant’s aggravated sentence was an error of law. Judge Lanier could not correct this judicial error by treating it as a mere clerical error and therefore, we must also vacate the denial of defendant’s MAR and the “amended” judgment.
III. Restitution
Defendant argues that the trial court erred by ordering restitution because the amount of restitution was not supported by competent evidence. Since defendant’s judgment has been vacated, the restitution order has necessarily also been vacated. Nevertheless, we address *114defendant’s restitution argument for directional purposes, as we agree that the trial court erred by ordering restitution.1
Initially, we address the State’s contention that this issue is not properly before this Court. The State argues that defendant has no right to appeal the restitution recommendation under N.C. Gen. Stat. § 15A-1444, which sets out a criminal defendant’s limited right to appeal following a guilty plea. This statute states, in relevant part:
(al) A defendant who has been found guilty, or entered a plea of guilty or no contest to a felony, is entitled to appeal as a matter of right the issue of whether his or her sentence is supported by evidence introduced at the trial and sentencing hearing only if the minimum sentence of imprisonment does not fall within the presumptive range for the defendant’s prior record or conviction level and class of offense. Otherwise, the defendant is not entitled to appeal this issue as a matter of right but may petition the appellate division for review of this issue by writ of certiorari.
N.C. Gen. Stat. § 15A-1444(al) (2011).
The State, in its brief, cites two unpublished cases, State v. Chiles, _N.C. App._, 694 S.E.2d 522, 2010 N.C. App. LEXIS 832, 2010 WL 1957867 (2010)(unpublished) and State v. Harris, 191 N.C. App. 400, 663 S.E.2d 13, 2008 N.C. App. LEXIS 1337, 2008 WL 2736673 (2008)(unpublished), in which this Court dismissed previous attempts to challenge restitution orders by a defendant who pled guilty. As these opinions were unpublished, they have no precedential authority. See N.C.R. App. P. 30(e) (2010).
By contrast, in a published case, State v. Davis, this Court determined that it had jurisdiction to address the defendant’s appeal of a restitution order even though the defendant had pled guilty, when the defendant had appealed his aggravated sentence as a matter of right under N.C. Gen. Stat. § 15A-1444 (al)._N.C. App. _,_, 696 S.E.2d 917, 921-22 (2010). Although defendant’s appeal in the instant case is pursuant to a writ of certiorari, defendant could also have appealed his sentence as a matter of right pursuant to N.C. Gen. Stat. § 15A-1444(al), and thus, this case is materially indistinguishable *115from Davis. As a result, defendant’s guilty plea does not preclude review of the trial court’s restitution recommendation. See id.
This Court has repeatedly stated that “[t]he amount of restitution recommended by the trial court must be supported by evidence adduced at trial or at sentencing.” State v. Replogle, 181 N.C. App. 579, 584, 640 S.E.2d 757, 761 (2007) (internal quotations and citation omitted). In the instant case, the State concedes that the restitution recommendation was not supported by competent evidence. Therefore, we vacate the trial court’s restitution recommendation in the amount of $5;052.75.
IV. Mistake in the Plea Agreement
Defendant requests that we remand the instant case for a new sentencing hearing. The State, in contrast, does not advocate a precise disposition, but agrees that the case must be remanded “for further proceedings.” We agree with defendant that a new sentencing hearing is required. However, in light of the plea agreement, it is necessary to determine the precise parameters of this new sentencing hearing.
The terms of the plea agreement were as follows:
Upon the defendant’s plea of guilty to the offense listed below [voluntary manslaughter], the State will not proceed on the remaining related offense listed on the reverse [murder]. The defendant admits the existence of aggravating factor No. 10(b) (used a deadly weapon at the time of the crime])]. The defendant shall receive an active sentence of not less than 84 months nor more than 110 months in the NC Dept, of Correction!]. Further, the defendant waives any rights under NCGS 15A-268 regarding the disposal or destruction of evidence.
Both the State and defendant identify a mistake in a material portion of this plea agreement. As previously noted, defendant’s agreed upon sentence, as stated in the plea agreement, was in the aggravated range for his prior record level. To facilitate this aggravated sentence, defendant agreed to admit that he used a deadly weapon at the time of the offense, and both the State and the trial court appear to have assumed that the use of this aggravating factor was appropriate.
However, N.C. Gen. Stat. § 15A-1340.16(d) states that “[ejvidence necessary to prove an element of the offense shall not be used to prove any factor in aggravation^]” Following a previous version of this statute, the Court in State v. Rivers held that when the use of a *116deadly weapon was necessary to prove the unlawful killing element of voluntary manslaughter, it could not also be used as an aggravating factor. 64 N.C. App. 554, 557, 307 S.E.2d 588, 590 (1983).
In the instant case, as in Rivers, defendant’s use of a deadly weapon was necessary to prove the unlawful killing element of voluntary manslaughter. Consequently, even though defendant admitted to the aggravating factor of use of a deadly weapon, this could not support imposition of an aggravated sentence for his guilty plea to voluntary manslaughter, as contemplated by the parties in the plea agreement.
As a result of this mistake, the State cannot, under the original terms of the plea agreement, legally receive the full benefit of its bargain by having the trial court sentence defendant in the aggravated range. In light of this circumstance, we must determine whether the mistake requires the plea agreement to be set aside, in an attempt to return the parties to their original position. This determination is further complicated by the fact that it is no longer possible to fully return the parties to their respective positions before the plea agreement was executed. As part of the plea agreement, defendant agreed to “waive any rights under NCGS 15A-268 regarding the disposal or destruction of evidence.”2 As a result, it is likely that much, if not all, of the biological evidence against defendant has been destroyed in the years following defendant’s plea.
This Court has explained that “[although a plea agreement occurs in the context of a criminal proceeding, it remains contractual in nature. A plea agreement will be valid if both sides voluntarily and knowingly fulfill every aspect of the bargain.” State v. Rodriguez, 111 N.C. App. 141, 144, 431 S.E.2d 788, 790 (1993)(intemal citation omitted). Moreover, our Supreme Court has stated that
[w]hen viewed in light of the analogous law of contracts, it is clear that plea agreements normally arise in the form of unilateral contracts. The consideration given for the prosecutor’s promise is not defendant’s corresponding promise to plead guilty, but rather is defendant’s actual performance by so pleading. Thus, the prosecutor agrees to perform if and when defendant performs but has no right to compel defendant’s performance. Similarly, *117the prosecutor may rescind his offer of a proposed plea arrangement before defendant consummates the contract by pleading guilty or takes other action constituting detrimental reliance upon the agreement.
State v. Collins, 300 N.C. 142, 149, 265 S.E.2d 172, 176 (1980). Thus, “the State may withdraw from a plea bargain arrangement at any time prior to, but not after, the actual entry of the guilty plea by defendant or any other change of position by him constituting detrimental reliance upon the arrangement.” Id. at 148, 265 S.E.2d at 176.
In the instant case, defendant fully performed his duties under the terms of the plea agreement. Specifically, defendant pled guilty to the offense of voluntary manslaughter and admitted to the existence of the aggravating factor that he used a deadly weapon at the time of the offense. Moreover, nothing in the plea agreement precluded defendant from challenging his sentence collaterally, and we cannot judicially impose such a condition. Defendant’s challenge to his sentence is specifically permitted by our statutes and does not impact his performance under the plea agreement. Since defendant has fully performed under the plea agreement and has not breached the agreement in any way, it would be inequitable to release the State from its obligations under the agreement. See id. Consequently, defendant should be resentenced on his guilty plea under the plea arrangement.
This result is supported by this Court’s recognition that the State bears a higher degree of responsibility for the contents of plea agreements. In State v. Blackwell, the Court stated that “due process mandates strict adherence to any plea agreement. Moreover, this strict adherence requires holding the [State] to a greater degree of responsibility than the defendant (or possibly than would be either of the parties to commercial contracts) for imprecisions or ambiguities in plea agreements.” 135 N.C. App. 729, 731, 522 S.E.2d 313, 315 (1999) (internal quotations and citations omitted). Accordingly, the risk of mistake in plea agreements lies with the State, and the State may not withdraw or have set aside a plea agreement based upon an uninduced mistake contained therein. See Deans v. Layton, 89 N.C. App. 358, 363, 366 S.E.2d 560, 564 (1988).
In particular, the State should be well cognizant of the law of North Carolina, as reflected in our statutes and the prior decisions of our Courts, and be fully responsible for any mistakes related to this law when it negotiates plea agreements. As explained by the Utah Court of Appeals, “[t]he State is generally in the better position to *118know the correct law, given that the State has control over the charges in the information and final say over whether to accept a defendant’s plea, and the State must be deemed to know the law it is enforcing.” State v. Patience, 944 P.2d 381, 388 (Utah Ct. App. 1997); see also Coy v. Fields, 27 P.3d 799, 803 (Ariz. Ct. App. 2001)(“We, too, hold the state accountable for knowing Arizona law when it negotiates, drafts, and enters into plea agreements.”) and Osborne v. State, 499 A.2d 170, 178 (Md. 1985)(“The State must be held to be aware of the common law and the statutes of Maryland.”).
In the instant case, it was clear from our statutes and from the decisions of this Court that the State could not use defendant’s use of a firearm as an aggravating factor to enhance his sentence for voluntary manslaughter. N.C. Gen. Stat. § 15A-1340.16(d) clearly states that “[e]vidence necessary to prove an element of the offense shall not be used to prove any factor in aggravation,” and cases from this Court, such as Rivers, which have dealt precisely with the scenario at issue in the instant case, are nearly thirty years old. The State should have been fully aware of this applicable law when it entered into the plea agreement, and “we refuse to relieve the State of what it now considers a bad bargain where the plea agreement was the result of uninduced mistake . . . .” Patience, 944 P.2d at 388. Ultimately,
[w]hen the State is culpable in creating an illegal sentence in an otherwise lawful plea agreement, we reject the proposition that the remedy is that the parties be returned to where they were before the plea agreement. Instead, fundamental fairness and the analogous contract principles require that we allow the defendant to retain the benefit of his plea bargain and be lawfully sentenced.
State v. Alba, 697 N.W.2d 295, 307 (Neb. Ct. App. 2005). Accordingly, we refuse to set aside the plea agreement, and instead remand the instant case to the trial court for a new sentencing hearing on defendant’s guilty plea.
V. Conclusion
Defendant’s original aggravated sentence was invalid as a matter of law because Judge Duke failed to make any findings as to aggravating factors and failed to exercise his discretion in determining whether an aggravated sentence was appropriate, as required by the Structured Sentencing Act. Since Judge Duke’s errors were errors of law, Judge Lanier could not correct them under the guise of amending a clerical error. Consequently, defendant’s initial and amended judgments and Judge Lanier’s order denying defendant’s MAR are vacated.
*119Since defendant could appeal his sentence as a matter of right, he was also permitted to challenge the trial court’s restitution recommendation pursuant to Davis. The restitution recommendation was not supported by competent evidence and must also be vacated.
There was a mistake in the plea agreement in that, contrary to the belief of the parties, the aggravating factor of use of a firearm cannot enhance a sentence for voluntary manslaughter by use of that same firearm. However, defendant has fully complied with the terms of his plea agreement, and the risk of any mistake in a plea agreement must be borne by the State. As a result, the State remains bound by the plea agreement and defendant should be resentenced upon his guilty plea to voluntary manslaughter.
Vacated and remanded.
Judge ELMORE concurs. Judge STEELMAN concurs in part and dissents in part by separate opinion.. Defendant’s judgment ordered that “upon completion of the term of imprisonment imposed herein, the defendant shall be delivered over to the custody of the Immigration [and] Custom[s] Enforcement or it’s [sic] successor, for the immediate deportation to the Republic of Mexico.” This suggests that, as a practical matter, the restitution recommendation may be unenforceable because it is a condition of work release or post-release supervision.
. Even if defendant had not waived his rights, N.C. Gen. Stat. § 15A-268 only required biological evidence to be preserved for three years after defendant’s conviction, since defendant entered a guilty plea. See N.C. Gen. Stat. § 15A-268 (a6)(3) (2011)(“[I]n [homicide] cases where the person convicted entered and was convicted on a plea of guilty, . . . evidence shall be preserved for the earlier of three years from the date of conviction or until released.”).