
948 N.E.2d 24 (2011)
241 Ill.2d 266
The PEOPLE of the State of Illinois, Appellant,
v.
Terry ALSUP, Appellee.
No. 108354.
Supreme Court of Illinois.
January 21, 2011.
Rehearing Denied March 28, 2011.
*25 Lisa Madigan, Attorney General, of Springfield, and Anita Alvarez, State's Attorney, of Chicago (James E. Fitzgerald, Ashley A. Romito, John E. Nowak, Alan J. Spellberg and Annette Collins, Assistant State's Attorneys, of counsel), for the People.
Michael J. Pelletier, State Appellate Defender, Alan D. Goldberg, Deputy Defender, and Michael C. Bennett, Assistant Appellate Defender, of the Office of the State Appellate Defender, of Chicago, for appellee.
Terry Alsup, of Hillsboro, appellee pro se.

OPINION
Justice THEIS delivered the judgment of the court, with opinion.
After a bench trial, defendant Terry Alsup was convicted of two counts of possession of controlled substances with intent to deliver in violation of the Illinois Controlled Substances Act (720 ILCS 570/401(c)(2), (d) (West 2004)) and sentenced to 11 years' imprisonment. The appellate court found that the trial transcript revealed a "complete breakdown" in the chain of custody on one charge and reversed one of defendant's two convictions. No. 1-06-0513 (unpublished order under Supreme Court Rule 23). We reverse the appellate court.

BACKGROUND
On March 22, 2005, Chicago police officers arrested defendant for narcotics transactions. The State charged defendant *26 by information with, inter alia, counts of possession with intent to deliver heroin and cocaine.[1] The case proceeded to trial.
Chicago Police Officer Marco Garcia testified that on March 22, 2005, he and Officer Lawrence Olivares were in a covert vehicle on surveillance for possible narcotics transactions near Independence Boulevard in Chicago. He testified that on the day in question, he observed defendant in an alley behind 1319 South Independence. Defendant stood alone in a black jacket and tan pants. According to Garcia, an unknown male approached defendant and handed defendant currency. Defendant then walked to a row of three black city garbage cans. Defendant leaned down at the northernmost can, retrieved a small item, and returned to the person to give him the item. The person proceeded westbound toward Independence Boulevard. Two subsequent transactions with unknown males occurred similarlyUnited States currency was tendered, defendant relocated to the garbage can, retrieved a small item and then tendered the item to the person. Officer Garcia observed no other individuals approach the garbage can. After the third transaction, Officer Garcia radioed an enforcement team.
The enforcement team was directed by Officer Garcia to the location to arrest defendant and search behind the garbage can. A member of the enforcement team, Officer Christopher Jania, testified that he and another officer were in plain clothes in an unmarked car when they received a radio call from Officer Garcia. Officer Jania found defendant standing alone near the back of the building at 1317 South Independence, approximately 25 feet to the north of the garbage cans. Following Officer Garcia's directions, he knelt down behind the wheel of the northernmost can. With the aid of a flashlight, he found a ziplock bag containing 10 smaller ziplock bags of suspected cocaine and five tinfoil packets of suspected heroin. Officer Jania saw nothing else behind the garbage can. They then arrested defendant without resistance. A custodial search of the defendant revealed that a front pocket contained $15 United States currency. The 10 ziplock bags had a total weight of 1.05 grams of cocaine and the 5 tin foil packets contained a total weight of less than 0.1 gram of heroin.
Officer Jania testified that after he arrested defendant, he held the suspected narcotics on his person and transported them back to the police station, maintaining them under his care, custody, and control. He then turned them over to Officer Olivares, who was assigned the inventories. Officer Olivares obtained from the dispatcher a unique inventory number, also called an "R.D." number, or "records division" number. The number received from the dispatcher was 10502687 and Officer Jania entered it into the computer. Officer Jania testified that the recovered narcotics were placed in a "narcotics bag," a clear, plastic bag with green boxes on it, which was approximately 12-by-6 inches. Written in the green boxes was the relevant information regarding the case, including the time of arrest, inventory number and "other information related to the case." According to Jania, the appropriate boxes were filled out and the bag was handed to a sergeant on duty, who determined that the inventory process had been correctly followed. The sergeant then dropped the signed and sealed bag containing the recovered narcotics into the narcotics vault.
*27 Following the testimony of Officer Jania, the parties proceeded by stipulation. The parties orally entered the stipulated expert testimony of forensic scientist Daniel Bryant into evidence:
"[Assistant State's Attorney]: Would also be a stipulation with respect to the lab in this case. Daniel Bryant, B-r-y-a-n-t, would testify that he is a forensic scientist
Court: Slow down slow down.
[Assistant State's Attorney]: I'm sorry. Employed by the Illinois State Police Crime Lab, qualified to testify as an expert in the field of forensic chemistry.
Would testify that he received the items under inventory number 10502687 from the Chicago Police Department in a heat sealed condition.
He would testify that he removed the items, found them to contain under 1A1 and 1A2, nine items and under 1B ten other items.
He subjected all those items to tests commonly accepted in the field of forensic chemistry for ascertaining the presence of a controlled substance.
After performing the tests using equipment which was properly calibrated and functioning he found the items under 1A1 to be positive for less than .1 grams of heroin and the items under 1B1 to be positive for 1.05 grams of cocaine.
He reached theseThis expert opinion within a reasonable degree of scientific certainty that there was a proper chain of custody maintained at all times with respect to the narcotics and that he would be able to identify them in open court. So stipulated?
[Defense Counsel]: So stipulated."
The State then rested. Defendant moved for a directed verdict. According to defense counsel, the evidence in this casethe "generic description" of the transactions, lack of information from the observed specific buyers, and the small amount of cashtogether did not amount to evidence of an intent to deliver drugs. Defense counsel asserted to the trial court, "we have an amount of cocaine and amount of heroin found. What, if anything, was sold to these people is anyone's guess I think based on that amount of money." He also argued "this was a weak case of constructive possession" pointing to Officer Jania's use of a flashlight in the middle of the day and the lack of fingerprints on the baggies. The trial judge denied defendant's motion.
Bertha Barfield testified on defendant's behalf. She testified that she is the mother of defendant's five children. On March 22, 2005, she and defendant drove to the residence at 1317 South Independence Boulevard where her daughter's boyfriend resided. Because the doorbell was not functioning, Barfield stood outside and called up to her daughter. According to Barfield, plain-clothed police officers appeared and grabbed her and threw her against the wall. Defendant attempted to prevent this. As described by Barfield at the bench trial, "Terry got out of the car, was coming up to him like a man, why are you searching my woman." Defendant was then arrested. Barfield asserted defendant was not involved in drug transactions that afternoon.
Defense counsel's closing argument urged the court to find Barfield's version of events to be credible and the officers' version incredible. The State asserted that the officers' testimony along with the stipulation proved defendant's guilt.
The trial court made a credibility determination in favor of the State. The court stated in its oral findings of fact that "it was the defendant whom [an officer] observed in the alley and on three occasions *28 involved in the transactions with the three individuals who approached him." The judge also rejected defense counsel's argument relating to constructive possession. The court found defendant guilty of two counts of possession of a controlled substance with intent to deliver, one count for heroin and the other for cocaine. Defendant filed a form motion for a new trial, which was denied. The court sentenced defendant as a Class X offender to concurrent 11-year terms of imprisonment for the two offenses.
The record on appeal revealed a discrepancy. Officer Jania testified that he recovered five items of heroin. The assistant State's Attorney's recitation of the stipulation regarding forensic chemist Daniel Bryant was that Bryant tested nine items of heroin. Defendant asked the appellate court to reverse his conviction for possession of heroin with intent to deliver. He claimed the State failed to prove beyond a reasonable doubt the items that tested positive for heroin were the same five tinfoil packets of suspected heroin retrieved from behind the black city garbage can. People v. Alsup, No. 1-06-0513 (2008) (unpublished order under Supreme Court Rule 23). Initially, the appellate court rejected defendant's argument and affirmed defendant's conviction on the heroin count. Id.
Defendant filed a petition for rehearing. He argued that the discrepancy fell under the plain-error exception of this court's decision in People v. Woods, 214 Ill.2d 455, 293 Ill.Dec. 277, 828 N.E.2d 247 (2005). The State responded by filing in the trial court a "Motion Pursuant to Illinois Supreme Court Rule 329 to Make the Record Conform to the Truth," with various documents attached, disputing that the word "nine" was properly uttered in court during defendant's trial. According to the State, the assistant State's Attorney misspoke or the court reporter mistranscribed the word "nine." The supplemental record before this court contains a transcript of the Rule 329 hearing in the trial court. At the end of this hearing, the trial court stated:
"You checked with the court reporter. She checked her notes, and she has the word 9 down. I also went back and I checked my notes, which are not official, but I checked my notes of the trial. I wrote 9 down also. So, I will admit I was in error because had I checked my notes more closely at that time on that one count, I would have entered a finding of not guilty. I don't think the State gets a chance to come back and get a second bite at the apple."
The trial judge therefore rejected the State's motion.
On March 6, 2009, the appellate court granted defendant's petition for rehearing and withdrew its August 8, 2008, Rule 23 order. In its new order, the appellate court held the evidence failed to establish a link between the items seized at the time of defendant's arrest and the items tested by the chemist. No. 1-06-0513 (unpublished order under Supreme Court Rule 23). The appellate court stated the discrepancy leads to the conclusion that the State failed to introduce sufficient evidence with respect to the element of possession and constituted reversible plain error on the heroin count. Defendant's conviction for cocaine remained undisturbed.
We granted the State's petition for leave to appeal. Ill. S.Ct. R. 315 (eff. Feb.26, 2010).

ANALYSIS
In cases involving controlled substances, the rules of evidence require that before the State can introduce results of chemical testing of a purported controlled substance, it must provide a foundation for *29 its admission by showing the police took reasonable protective measures to ensure that the substance recovered from the defendant was the same substance tested by the forensic chemist. People v. Woods, 214 Ill.2d 455, 466, 293 Ill.Dec. 277, 828 N.E.2d 247 (2005). The trial court must determine whether the State has met its "burden to establish a custody chain that is sufficiently complete to make it improbable that the evidence has been subject to tampering or accidental substitution." Id. at 467, 293 Ill.Dec. 277, 828 N.E.2d 247. Once the State has established this prima facie case, the burden then shifts to the defendant to show actual evidence of tampering, alteration or substitution. Id. at 468, 293 Ill.Dec. 277, 828 N.E.2d 247.
In the absence of such evidence from defendant, a sufficiently complete chain of custody does not require that every person in the chain testify, nor must the State exclude every possibility of tampering or contamination. Id. at 467, 293 Ill.Dec. 277, 828 N.E.2d 247. It is not erroneous to admit evidence even where the chain of custody has a missing link if there was testimony which sufficiently described the condition of the evidence when delivered which matched the description of the evidence when examined. Id. at 467-68, 293 Ill.Dec. 277, 828 N.E.2d 247. At this point, deficiencies in the chain of custody go to the weight, not admissibility, of the evidence. Id. at 467, 293 Ill.Dec. 277, 828 N.E.2d 247 (quoting People v. Bynum, 257 Ill.App.3d 502, 510, 196 Ill.Dec. 179, 629 N.E.2d 724 (1994)).
The chain of custody establishes a foundation for such evidence as reliable and admissible; it does not function as proof of the existence of an element of the crime of possession of a controlled substance. Id. at 473, 293 Ill.Dec. 277, 828 N.E.2d 247. Accordingly, a challenge to the chain of custody does not serve as a challenge to the sufficiency of the evidence to support a conviction and is not exempt from forfeiture. Id. Rather, such a challenge is considered an attack on the admissibility of the evidence and is thus subject to the ordinary rules of forfeiture. Id.; see also People v. Blair, 215 Ill.2d 427, 294 Ill.Dec. 654, 831 N.E.2d 604 (2005) (discussing waiver and forfeiture).
While the parties are in agreement that the chain of custody issue was not properly preserved for review, the parties dispute whether the issue may be properly considered by this court on appeal under the plain-error doctrine. Under the plain-error doctrine, we will review unpreserved error when either (1) the evidence is closely balanced, regardless of the seriousness of the error; or (2) the error is serious, regardless of the closeness of the evidence. People v. Herron, 215 Ill.2d 167, 186-87, 294 Ill.Dec. 55, 830 N.E.2d 467 (2005); People v. Piatkowski, 225 Ill.2d 551, 564-65, 312 Ill.Dec. 338, 870 N.E.2d 403 (2007). Basing its argument on this court's decision in People v. Woods, the defendant argues that the unpreserved error is serious, requiring plain-error review, because the five-versus-nine discrepancy indicates a "complete breakdown" in the chain of custody. This "complete breakdown," according to defendant, constitutes a failure to prove the identity of the substance which is an element of the offense. Defendant interprets the Woods decision to allow review under plain error despite defendant's affirmative waiver of the chain of custody issue at trial because a challenge to the sufficiency of the evidence cannot be waived. We disagree that Woods requires such a result in this case.
In Woods, police arrested the defendant after having been seen selling apparent contraband to passing motorists. While under surveillance, Woods took paper currency from stopped motorists and removed *30 an object from the area of the front tire of a blue van, handing the object to the motorist. Woods, 214 Ill.2d at 459-60, 293 Ill.Dec. 277, 828 N.E.2d 247. One of the arresting officers, Officer Dineen, testified the items recovered from under the van consisted of "three zip-lock packets each containing a tin foil packet containing what [he] believed to be heroin." These items were inventoried under inventory number "2550419" and "`standard Chicago Police Department procedures'" were followed. Id. at 472, 293 Ill.Dec. 277, 828 N.E.2d 247. The State offered no further evidence other than a stipulation that if forensic chemist Lisa Gilbert were to testify, she would state she received inventory No. 2550419 in a sealed condition and found three packets. She performed tests for ascertaining the presence of a controlled substance on one packet and found it to contain 0.1 gram of heroin. She estimated the weight of the remaining two packets to be 0.2 grams. Defense counsel stipulated to this testimony. Id. at 461, 293 Ill.Dec. 277, 828 N.E.2d 247. The trial court found defendant guilty. In reversing, the appellate panel highlighted some of the deficiencies in the chain of custody testimony.
On appeal to this court, we acknowledged that under limited circumstances defendant may raise a challenge to the chain of custody for the first time on appeal if the alleged error rises to the level of plain error. Id. at 471, 293 Ill.Dec. 277, 828 N.E.2d 247. We contemplated:
"[T]hose rare instances where a complete breakdown in the chain of custody occurse.g., the inventory number or description of the recovered and tested items do not matchraising the probability that the evidence sought to be introduced at trial was not the same substance recovered from defendant, a challenge to the chain of custody may be brought under the plain error doctrine. When there is a complete failure of proof, there is no link between the substance tested by the chemist and the substance recovered at the time of the defendant's arrest. In turn, no link is established between the defendant and the substance. In such a case, a failure to present a sufficient chain of custody would lead to the conclusion that the State could not prove an element of the offense: the element of possession. However, in the instant matter we are not faced with a situation that requires preservation of defendant's right to challenge the State's chain of custody for the first time on appeal." (Emphases added.) Id. at 471-72, 293 Ill.Dec. 277, 828 N.E.2d 247.
With this in mind, we held that the State laid an adequate foundation for the heroin evidence. Id. at 472-73, 293 Ill.Dec. 277, 828 N.E.2d 247. We found that the testimony of the officer and the contents of the stipulation raised the probability that the substance tested by the chemist and the substance recovered at the scene were the same. Accordingly, the State met its burden because the evidence recovered by the officer and that tested by the forensic scientist were linked. Id.; cf. People v. Maurice, 31 Ill.2d 456, 202 N.E.2d 480 (1964) (State presented "no link" between the heroin in evidence and the defendant).
We also rejected the Woods defendant's attempt to sidestep the consequences of his stipulation to the chemist's testimony through his argument that a challenge to the chain of custody is a question of the sufficiency of the evidence. Woods, 214 Ill.2d at 472, 293 Ill.Dec. 277, 828 N.E.2d 247. We noted that the Woods defendant did not forfeit his challenge to the chain of custody at trial, but rather affirmatively waived his challenge by agreeing to stipulate to the chemist's testimony. This court pointed out that it was the clear intent of the parties to remove from the case any *31 dispute regarding the chain of custody. Id. at 474, 293 Ill.Dec. 277, 828 N.E.2d 247. Accordingly, we held that the appellate court erred in failing to apply the waiver rule to bar defendant from raising, for the first time on appeal, a challenge to the sufficiency of the State's chain of custody. Id. at 475, 293 Ill.Dec. 277, 828 N.E.2d 247.
Turning to the instant case, we find the testimony and the stipulation at trial established the probability that the items recovered by Jania and the items tested by Bryant were the same. The record reveals Officer Jania testified he retrieved five tinfoil packets of suspected heroin along with baggies of cocaine from the northernmost garbage can, which, as Officer Garcia testified, defendant used as a storing place. It is undisputed that Jania used reasonable protective measures to ensure safekeeping of the evidence from the time he seized it. According to his unchallenged testimony, Officer Jania kept the evidence from the scene on his person. He transported it back to the police station, maintaining it under his care, custody, and control. Identifying information was written on the heat-sealed evidence bag. It is undisputed that all information on the bag was correctly written and was placed in the evidence vault by the sergeant. Officer Jania also testified, without contradiction, that protocol had been appropriately followed.
Further, the parties agreed that Daniel Bryant would have testified the evidence bag was labeled with the same inventory number as stated by Officer Jania, 10502687. He also would have testified the bag was received in a heat-sealed condition. Defendant stipulated that Bryant would have testified to the maintenance of a proper chain of custody "at all times." Defendant stipulated Bryant would have been able to identify the heroin in open court which he had received in a heat-sealed condition with the markings as testified to by Jania. This applied not only to the heroin, but also to the cocaine recovered from the garbage can in the alley near Independence Boulevard. There remains no dispute that the chain of custody with regards to the cocaine, which was in the same heat-sealed bag as the heroin, was sufficient. All of this evidence indicates that it was improbable that the evidence had been subject to tampering, alteration, or substitution, and therefore the State satisfied its prima facie case.
As the State established this prima facie case, the burden shifted to the defendant to show actual tampering, alteration or substitution. Id. at 468, 293 Ill.Dec. 277, 828 N.E.2d 247. Defendant did not do so. Once the prosecution established the probability that the evidence was not compromised, and because the defendant did not show actual evidence of tampering or substitution, the deficiencies in the chain of custody went to the weight, not to the admissibility, of the evidence. Id. at 467, 293 Ill.Dec. 277, 828 N.E.2d 247.
Moreover, the record as a whole reveals that the primary issues at trial concerned the credibility of the witnesses and defendant's challenge that the items he passed to the persons in the alley were actually controlled substances. The chain of custody issue was entirely removed from consideration by the stipulation. Id. at 469, 293 Ill.Dec. 277, 828 N.E.2d 247 (noting that stipulations dispense with the need for evidence). Because the parties intended to remove this issue from dispute, this action deprived the State of the opportunity to correct or explain the five-versus-nine discrepancy that was entered into the record. Id. at 469, 475, 293 Ill.Dec. 277, 828 N.E.2d 247.
We find defendant's argument that the five-versus-nine discrepancy constitutes a "complete breakdown" in the chain of custody *32 relies on an overbroad interpretation of our decision in Woods. Our statement in Woods regarding when a complete breakdown could conceivably occur"e.g., the inventory number or description of the recovered and tested items do not match"cannot be understood without the context of the case. The only common features in the testimony describing the condition of the evidence seized by Officer Dineen and the description of the evidence tested by Lisa Gilbert were the number of items and the inventory number assigned to those items. Further, the record was devoid of information regarding the procedures used by the police officers for safekeeping the alleged contraband and how the items were delivered to the crime lab. The record contained no evidence either by testimony or stipulation that Officer Dineen would have identified the items tested by the forensic chemist and would have testified that these items were in the same or substantially the same condition as when he recovered them from under the van. It was in the context of this dearth of links in the chain of custody that a mismatch of inventory numbers or tested items could be hypothetically reviewable under plain error. Defendant's reading that our "e.g.," or exempli gratia, statement quoted above is instead a per se exception overstates our holding.
In sum, we find that defendant has not established that "rare" case where a "complete breakdown" in the chain of custody occurred permitting him to raise a challenge to the discrepancy for the first time on appeal. Id. at 471-72, 293 Ill.Dec. 277, 828 N.E.2d 247. We conclude that Officer Jania's description of the chain of custody, combined with the stipulated testimony of Daniel Bryant, negate defendant's argument. The State's evidence, from the collection of the tinfoil packets in the alley to the stipulated testimony by forensic scientist Bryant, revealed the State satisfied its prima facie case. Id. at 468, 472-73, 293 Ill.Dec. 277, 828 N.E.2d 247. Thus, we hold the appellate court erred in failing to apply the waiver rule to bar defendant from raising, for the first time on appeal, a challenge to the discrepancy contained in the oral recitation of the stipulation. Id. at 475, 293 Ill.Dec. 277, 828 N.E.2d 247.

CONCLUSION
For the foregoing reasons, we reverse the judgment of the appellate court and affirm the judgment of the circuit court.
Appellate court judgment reversed; circuit court judgment affirmed.
Chief Justice KILBRIDE and Justices FREEMAN, THOMAS, GARMAN, KARMEIER, and BURKE concurred in the judgment and opinion.
NOTES
[1]  Defendant was also charged with, and acquitted of, possession with intent to deliver within 1,000 yards of a school. Those counts are not at issue on appeal.
