
958 P.2d 1203 (1998)
Cleus Vincent McGERVEY, Appellant,
v.
The STATE of Nevada, Respondent.
No. 29343.
Supreme Court of Nevada.
May 19, 1998.
*1204 James F. Sloan, Fallon, for Appellant.
Kevin L. Pasquale, District Attorney and Cheri K. Emm, Deputy District Attorney, Churchill County, for Respondent.

OPINION
PER CURIAM:
Cleus Vincent McGervey was arrested for a California parole violation and subsequently tested positive for marijuana and methamphetamine in his urine. A small quantity of methamphetamine was found on McGervey's person during the booking process. Officers then conducted a consensual search of McGervey's girlfriend's residence, where they discovered a small quantity of marijuana. Following a jury trial, McGervey was convicted of two counts of possession of a controlled substance and two counts of being under the influence of a controlled substance, was found to be a habitual offender pursuant to former NRS 207.010(2), and was sentenced to four concurrent terms of life imprisonment with the possibility of parole. McGervey now appeals, arguing that he was improperly shackled in the jury's presence, that insufficient evidence supported his marijuana-related *1205 conviction for possession of a controlled substance, and that the district court erred and abused its discretion in imposing habitual criminal sentences pursuant to former NRS 207.010(2).

Restraint at trial
McGervey argues that the district court abused its discretion in allowing McGervey to be shackled during the trial, thereby violating his "right to be clothed in an appearance of an innocent person." During the trial, McGervey's ankles were shackled to brackets on the floor beneath the table at which he and his counsel sat. An apron hung from the table's perimeter, obstructing the jury's view of the shackles. McGervey also claims that a deputy sheriff was seated near him during the trial, and stood near him during his testimony. McGervey was escorted to and from the courtroom with his hands cuffed to a belt around his waist. The jurors were not present when McGervey was escorted to and from the courtroom. McGervey provides no evidence suggesting that any member of the jury saw his shackles or was otherwise aware that he was shackled during the trial.
McGervey relies on NRS 178.394, which prohibits "any more restraint than is necessary for [the defendant's] detention to answer the charge." Prior to the penalty phase, NRS 178.394 requires that the court must find some immediate necessity to justify an order that the defendant be shackled during trial. Grooms v. State, 96 Nev. 142, 605 P.2d 1145 (1980); Sefton v. State, 72 Nev. 106, 295 P.2d 385 (1956); State v. McKay, 63 Nev. 118, 165 P.2d 389 (1946); cf. Canape v. State, 109 Nev. 864, 859 P.2d 1023 (1993). "[B]arring exceptional circumstances," a criminal defendant has the right "to appear before his jurors clad in the apparel of an innocent person." Grooms, 96 Nev. at 144, 605 P.2d at 1146 (citation omitted).
In considering whether a defendant should be shackled during trial, the district court "has the right to take into consideration knowledge acquired outside of formal evidence offered and admitted at trial." McKay, 63 Nev. at 158, 165 P.2d at 406-07. Immediately prior to commencement of the trial, the parties met with the district court judge to discuss the State's proposal to shackle McGervey during the trial. The prosecutor recounted an incident in which, on the date of McGervey's last court appearance, he violently pounded the walls and yelled profanities until officers used an entire can of pepper spray to subdue him. The district court also heard testimony from the jail sergeant who supervised McGervey in jail pending trial for the present offense. The sergeant testified that McGervey was difficult to control and had incited other inmates, making it necessary to transfer him to the state prison for "safe keeping" pending commencement of the trial. In addition, a police detective testified that McGervey, mistakenly believing the detective to be another officer, threatened him at the jail, shouting, "Woods, I'm going to get you! Fuck you!" Finally, the district court was aware that McGervey had recently absconded from parole in California, suggesting that he was a flight risk, that he had been charged with assaulting another inmate at a facility in Soledad, California, and that a fifteen-day disciplinary lockdown had been imposed on him while he was in safe keeping at the Nevada State Prison.
In addition to establishing a basis for the conclusion that the shackles were necessary, the district court received assurances from the State that aprons would be affixed to the counsel tables to prevent the jury from seeing McGervey's restraints and that the jury would not be present when McGervey was escorted to and from the courtroom. The district court judge also inspected the counsel tables himself, and concluded that the jurors would be unable to see McGervey's ankle restraints.
We conclude that, based on the foregoing considerations, the district court did not abuse its discretion in deciding that the ankle restraints were necessary to detain *1206 McGervey and to protect the people present in the courtroom. The officers involved had been unable to control McGervey in the jail, and it was reasonable to assume that they might encounter similar difficulties in the courtroom. Even if the district court had abused its discretion in allowing McGervey to be shackled during the trial, we conclude that the error would have been harmless. McGervey provides no evidence suggesting that any juror knew that he was physically restrained, and the record indicates that the district court took measures to assure that the jurors would not be able to see the shackles. Hence, we conclude that McGervey was not prejudiced under the circumstances.

Marijuana possession
McGervey argues that his marijuana-related conviction for possession of a controlled substance was not supported by sufficient evidence because the marijuana was found at the home of his girlfriend, Rosie Olivas, and, McGervey claims, he does not reside at that home. This court will not disturb a verdict on appeal if it is supported by sufficient evidence. Domingues v. State, 112 Nev. 683, 693, 917 P.2d 1364, 1371 (1996). A verdict is supported by sufficient evidence if "any rational trier of fact could have found the essential elements of the crime beyond a reasonable doubt, after viewing the evidence in the light most favorable to the prosecution." Id. (citation omitted).
In order to convict McGervey of possession of the marijuana found at Olivas' residence, the State was required to produce sufficient evidence that McGervey "exercised control over" the marijuana. See NRS 453.336. To establish this element, the State presented (1) police records indicating that 1.43 grams of marijuana were found on a living room table at the Olivas residence on April 16, 1995, (2) the testimony of Rebecca Ferrel, who shared the residence with Olivas, that she did not recall seeing the marijuana on the table when she left the residence on April 14, 1995, (3) Olivas' testimony that she did not notice the marijuana on the table when she went to bed in the early morning hours of April 16, 1995, and that McGervey and two of his friends were in the residence at that time, (4) police records indicating that McGervey briefly visited the residence in a blue Buick on April 16, 1995, and (5) McGervey's urine test results indicating the presence of marijuana in his system.
McGervey claims that he does not reside at Olivas' home, and Olivas and a friend, Sean McNevin, testified that McGervey does not reside with Olivas. The officers who conducted surveillance of Olivas' home did not see McGervey enter or exit the home on April 13, 14, or 15, 1995. In addition, Olivas, in a separate proceeding, pleaded guilty to possession of the marijuana at issue. A small quantity of marijuana was also found in Ferrel's bedroom.
We conclude that the State's evidence was not sufficient to establish that McGervey exercised dominion and control over the marijuana at issue. A number of people had an opportunity to leave the marijuana in the living room. Two of McGervey's friends had visited on the night before McGervey's arrest, and Ferrel had a small amount of marijuana in her bedroom, suggesting that the marijuana in the living room may have belonged to her. Furthermore, Olivas did, in fact, admit in a guilty plea to possession of the marijuana at issue. In light of these facts, we conclude that the State produced no evidence to suggest that McGervey was more likely than the others to have owned or exercised control over the marijuana. This court addressed a similar situation in Sanders v. State, 110 Nev. 434, 874 P.2d 1239 (1994), in which a small amount of cocaine was found in a motel room. Because many people had access to the motel room, this court found that there was insufficient evidence to establish, beyond a reasonable doubt, that the defendant knew of or exercised control over the cocaine. Similarly, insufficient evidence supported McGervey's conviction for possession of the marijuana found at Olivas' residence.

The habitual criminal sentences
McGervey contends that the district court erred in imposing the habitual criminal sentences *1207 of former NRS 207.010(2) rather than former NRS 207.010(1) and, alternatively, that the district court abused its discretion in imposing the sentences because McGervey's previous convictions were stale and because his present convictions are for relatively minor, nonviolent felonies. McGervey's two previous felony convictions, as considered by the district court, were for possession of cocaine for sale and for kidnapping and robbery. Both were California convictions, occurring in 1988 and 1990, respectively.
In the amended information by which McGervey was charged with each of the offenses underlying his present convictions, the State charged McGervey with being a habitual criminal "as defined by NRS 207.010." Following the jury's verdict, the district court imposed four concurrent life sentences based on its finding that McGervey is a "habitual offender pursuant to NRS 205.010(2)." As NRS 205.010 relates to arson rather than habituality, and as the information referred to NRS 207.010, we conclude that the district court's intended reference was to former NRS 207.010(2). Former NRS 207.010(2)[1] provided, in pertinent part:
Every person convicted in this state of . . . any felony, who has previously been three times convicted, whether in this state or elsewhere, of any crime which under the laws of the situs of the crime or of this state would amount to a felony . . . shall be punished by imprisonment in the state prison for life with or without possibility of parole. If the penalty fixed by the court is life imprisonment with the possibility of parole, eligibility for parole begins when a minimum of 10 years has been served.
(Emphasis added.)
McGervey argues that, because the State presented only two prior felony convictions upon which to base a habitual criminal sentence, the district court erred in applying former NRS 207.010(2). McGervey contends that the appropriate sentencing provision was former NRS 207.010(1), which, with similar language, specified a sentence range of ten to twenty years for habitual criminals with two prior felony convictions. Although McGervey presented this argument at his sentencing, the State argued that, based on "the operation of [NRS] 173.095," the present offense could be counted as a prior felony conviction under former NRS 207.010, and, therefore, former NRS 207.010(2) was the appropriate provision. The district court accepted the State's argument that one of the present convictions could be counted as McGervey's third prior felony, invoking former NRS 207.010(2).
We conclude that the district court erred in accepting the State's construction of NRS 173.095. NRS 173.095 addresses amendment of an indictment and provides, in pertinent part, that "[t]he court may permit an indictment or information to be amended at any time before verdict," and "[i]f an indictment is found charging a primary offense upon which a charge of habitual criminality may be based, the prosecuting attorney may file a notice of habitual criminality with the court." This language should not be read to conflict with the clear language of former NRS 207.010(2), requiring that a defendant must have "previously been three times convicted" for the statute to apply. See Schneider v. State, 97 Nev. 573, 574, 635 P.2d 304, 305 (1981) ("A person having three previous felony convictions is subject to a criminal enhancement sentence of life imprisonment upon conviction of a fourth felony."). Rather, NRS 173.095 simply allows a prosecutor to add a habitual criminal charge to an indictment or information if the prosecutor discovers sufficient prior convictions to warrant a habitual criminal sentence based on the current charge. In order for a "primary offense" to be one "upon which a charge of habitual criminality may be based," the prior *1208 convictions requirement of former NRS 207.010 must already have been satisfied.
McGervey next argues that the district court abused its discretion in sentencing him as a habitual criminal because his prior convictions were stale and because the present convictions are for relatively minor, nonviolent felonies. McGervey relies on Sessions v. State, 106 Nev. 186, 789 P.2d 1242 (1990), in which the defendant was sentenced to life without the possibility of parole for being a habitual criminal, following two drug-related convictions. This court found that the district court abused its discretion in imposing a habitual criminal sentence in that case because Sessions' previous convictions were both over twenty years old and were for trivial offenses. Under former NRS 207.010(4), the district court had discretion to dismiss counts brought under the habitual criminal statute. "The purpose of this section is to permit dismissal `when the prior offenses are stale or trivial, or in other circumstances where an adjudication of habitual criminality would not serve the purposes of the statute or the interests of justice.'" Id. at 190, 789 P.2d at 1244 (quoting French v. State, 98 Nev. 235, 237, 645 P.2d 440, 441 (1982)).
McGervey was convicted of possession of cocaine for sale in 1988 and of kidnapping and robbery in 1990. We conclude that, unlike Sessions, McGervey's prior convictions were neither remote nor trivial. McGervey argues that the relatively minor nature of his present offenses should also be considered; however, he provides no authority for the suggestion that the offense triggering the habitual criminal statute must meet some threshold other than felony status. Accordingly, we conclude that the district court did not abuse its discretion in sentencing him as a habitual criminal pursuant to former NRS 207.010.
In conclusion, we believe that, although the district court did not abuse its discretion in sentencing McGervey as a habitual criminal, the district court erred in imposing life sentences with the possibility of parole pursuant to former NRS 207.010(2). Because McGervey had only two prior felony convictions, former NRS 207.010(1), which addressed defendants who have "previously been twice convicted," was the appropriate provision. Under former NRS 207.010(1), habitual criminals may be sentenced to terms of ten to twenty years.
Accordingly, we reverse the marijuana-related conviction for possession of a controlled substance, affirm the remaining convictions, and remand this case to the district court with instructions to resentence appellant to terms of ten to twenty years as specified by former NRS 207.010(1).
NOTES
[1]  Former NRS 207.010 was amended in 1995, several months after McGervey was charged with the present offenses, and was again amended in 1997. NRS 207.010 governs "habitual criminals." McGervey would have been subject to life sentences for only two prior felonies under NRS 207.012, which governs "habitual felons"; however, NRS 207.012 was not adopted until the 1995 legislative session.
