
354 S.C. 151 (2003)
580 S.E.2d 120
Antoine CUTNER, Petitioner,
v.
STATE of South Carolina, Respondent.
No. 25644.
Supreme Court of South Carolina.
Submitted April 17, 2002.
Decided April 28, 2003.
*153 Chief Attorney Daniel T. Stacey, of Columbia, for Appellant.
Attorney General Henry Dargan McMaster, Chief Deputy Attorney General John W. McIntosh, Assistant Deputy Attorney General B. Allen Bullard Assistant Attorney General David Spencer, of Columbia, for Respondent.
Chief Justice TOAL:
Antoine Cutner ("petitioner") appeals his conviction, claiming the trial court lacked subject matter jurisdiction over the charge of possession with intent to distribute marijuana within proximity of a school, and that the trial court erred by allowing evidence that indicated petitioner was a dealer of crack cocaine. We affirm in part, reverse in part.

Factual/Procedural Background
Petitioner was convicted, after a trial in his absence, of possession with intent to distribute ("PWID") marijuana and PWID marijuana within proximity of a school. Two days later, petitioner pled guilty to other charges and was sentenced on those charges. His sealed sentence was opened and he was sentenced to ten years imprisonment for PWID marijuana and five years imprisonment, to be served consecutively, for PWID marijuana within proximity of a school. No direct appeal was taken.
Petitioner filed for post-conviction relief. After a hearing, the PCR court issued an order dismissing the PCR application without prejudice and granting petitioner a belated direct appeal under White v. State, 263 S.C. 110, 208 S.E.2d 35 (1974). Petitioner raises the following issues on appeal.
*154 I. Whether the trial court lacked subject matter jurisdiction over the charge of PWID marijuana within proximity of a school?
II. Whether the trial court erred by permitting evidence that petitioner was a dealer of crack cocaine?

Law/Analysis

I. Subject Matter Jurisdiction
Before trial, the State moved to amend the indictment regarding the charge of PWID marijuana within proximity of a school. The indictment read:
That ANTOINE CUTNER did in Richland County on or about March 30, 1998, distribute, sell, purchase, manufacture, or unlawfully possess with intent to distribute, a controlled substance, to wit: marijuana, while in, on, or within a one-half mile radius of the grounds of a public or private elementary, middle or secondary school; a public playground or park; a public vocational or trade school or a technical educational center; or a public or private college or university, to wit: Ridgewood Missionary Baptist Church.

(emphasis added). The State, claiming a scrivener's error, requested the indictment be amended to read "to wit: Eau Claire High School and/or Ridgewood/Babcock Center."
Petitioner's counsel argued against the amendment stating the amendment would change the nature of the offense charged.[1] The trial court overruled petitioner's objection, stating petitioner was placed upon sufficient notice as to the charge he was facing.
Petitioner claims the trial court erred by granting the State's motion to amend the indictment to show the drugs were possessed within proximity of Eau Claire High School, *155 rather than Ridgewood Baptist Church, as set forth in the indictment.
A circuit court has subject matter jurisdiction if: (1) there has been an indictment which sufficiently states the offense; (2) there has been a waiver of the indictment; or (3) the charge is a lesser-included charge of the crime charged in the indictment. Brown v. State, 343 S.C. 342, 540 S.E.2d 846 (2001) (citing Carter v. State, 329 S.C. 355, 495 S.E.2d 773 (1998)). "The true test of the sufficiency of an indictment is not whether it could be made more definite and certain, but whether it contains the necessary elements of the offense intended to be charged and sufficiently apprises the defendant of what he must be prepared to meet." Id. (quoting Browning v. State, 320 S.C. 366, 368, 465 S.E.2d 358, 359 (1995)) (emphasis added by Brown).
Under South Carolina Code Ann. § 17-19-100 (1985), the trial court "may amend the indictment ... if such amendment does not change the nature of the offense charged." Generally, amendments are permitted for the purposes of correcting an error of form, such as a scrivener's error. State v. Jones, 211 S.C. 319, 45 S.E.2d 29 (1947). Otherwise, if the defendant objects to an amendment on grounds that the amended indictment would change the nature of the offense, the trial judge is obligated to inform the parties of the necessity of reindictment or obtain a waiver of presentment from the defendant. Hopkins v. State, 317 S.C. 7, 10, 451 S.E.2d 389 (1994).
In the case at hand, amending the indictment from "to wit: Ridgewood Missionary Baptist Church" to state "to wit: Eau Claire High School and/or Ridgewood/Babcock Center" is not a scrivener's error. Ridgewood Missionary Baptist Church, Eau Claire High School, and Ridgewood/Babcock Center are all entities within a one-half mile radius of where petitioner was arrested, but only the schools make petitioner eligible for the additional penalties under South Carolina Code Ann. § 44-53-445 (2002). Section 44-53-445 does not separately criminalize distributing marijuana within proximity of a church, but the statute does create a separate offense for distributing marijuana within proximity of a school. As such, amending the indictment to name Eau Claire High School *156 and/or Ridgewood/Babcock Center changes the nature of the offense.
Counsel for petitioner objected to the amended indictment, which the trial court overruled. Since the amendment was not the result of a scrivener's error and defense counsel objected, the trial court only had two options under Hopkins: reindictment or waiver of presentment. The court pursued neither option to correct the defective indictment, and consequently it lost its subject matter jurisdiction. Thus, petitioner's conviction for PWID within the proximity of a school must be reversed.

II. Crack Cocaine Evidence
Petitioner argues the trial court erred by permitting evidence indicating he was a dealer of crack cocaine.
After receiving a tip, Investigator Wendell Harris and several other officers went to a wooded area in search of a person suspected of dealing drugs. Investigator Harris observed a known crack cocaine user exiting the woods where the suspect was alleged to be. Before Harris exited the car in which he was riding, he saw a person fitting the description of the suspect and recognized the person to be petitioner. Upon exiting the car, he saw petitioner "turn to run and ... observed a black-like bag in his hand as he made the turn."
Harris testified petitioner ran a few feet into the woods with the bag before dropping it. He chased petitioner through the woods and by the time he reached the other side, another officer had apprehended petitioner. Petitioner indicated he had been in the woods to cut firewood. An officer later emerged from the woods with the bag Harris saw petitioner drop and a beeper. The bag had been located approximately fifteen feet into the wooded area. Inside the bag were plastic baggies, containing approximately 37 grams of marijuana, and a small scale.
The officer who located the bag and beeper asked to whom the beeper belonged. Petitioner indicated the beeper was his, but the bag was not. The beeper had been found within a few feet from the bag.
*157 During trial, Investigator Harris testified that while chasing petitioner, he observed petitioner "pulling out what appeared to be white-like rocks and throwing them to the left and to the right." He also testified "[biased on [his] experience, no doubt [petitioner] was getting rid of crack cocaine." At this point, defense counsel objected. Following an off-the-record bench conference, the trial court instructed the jury:
... this defendant upon this indictment is charged with possession with intent to distribute a quantity of marijuana, to which charge he has pled not guilty. There is some testimony here about crack cocaine. This defendant is not charged with possession of crack cocaine, he is not charged with crack cocaine in any way whatsoever, so do not consider any testimony relative to crack cocaine. That is simply not an issue in this case.
Following the instruction, Harris was again asked about observing petitioner throwing out white objects without objection by defense counsel. The solicitor then questioned Harris about the fact that petitioner was not charged with crack cocaine and that crack cocaine was not found at the scene. The following also occurred during Harris' direct examination:

Question: Speaking of not being able to find the crack cocaine on the ground and all this concern about children, because children were out at 4 o'clock when the defendant was selling drugs; correct?

Answer: That's correct.

Question: All right. You even lost your

Defense counsel: Objection ... [t]here is no allegation the defendant was selling drugs.

Solicitor: He says it in his statement.... I withdraw the question....

The court: Withdraw the question.... Sustained.
On cross-examination, defense counsel asked why the case summary and the incident report prepared by Harris did not mention "seeing [petitioner] reach into his waistband and throw crack cocaine on the ground." Harris stated he did not include that information because it was irrelevant. Counsel then asked Harris if it was irrelevant, why he mentioned it in his trial testimony. Harris dodged this question. The questioning continued:

*158 Question by defense counsel: ... you thought you saw him throw crack cocaine on the ground and you didn't go back there and try to find it, you just left it there for anybody to find, kids can walk back there and get crack cocaine on the ground?

Answer: No, we tried to recover it, but due to the density of the woods and you talking about [sic] micrograms of crack, it would be almost impossible to locate.
Prior to trial, petitioner's statement to the police was read aloud during the Jackson v. Denno[2] hearing. The statement is as follows:

Question by Investigator Harris: Tell me what you were doing in the woods at Ridgewood Apartments.

Answer: I went in the woods to get my money from a crack dealer that sells for me.

Question: How much dope did you have?

Answer: Three hundred dollars' worth.

Question: Why did you run from the police?

Answer: I was scared because I got charges on me.

Question: Who was the other guys [sic] out there with you?

Answer: Quinton Johnson and a subject named Terry.

Question: Was Quinton selling drugs?

Answer: Yes.

Question: What does the crackhead sell for you?

Answer: He sells crack for me.

Question: Is there anything else you would like to add?

Answer: No.
At the end of the hearing, defense counsel objected to the statement under State v. Lyle, 125 S.C. 406, 118 S.E. 803 (1923) and Rule 404(b), SCRE, on the basis the statement was evidence of other bad acts and that the prejudice of admitting the statement outweighed its probative value. The court admitted the statement under Rule 404(b). The court also noted the statement went "to the issue then being investigated." *159 Upon the defense's request, the court indicated it would give a limiting instruction regarding the evidence.
During Investigator Harris' testimony, petitioner's statement was read into the record. The solicitor again asked Harris questions about the relevancy of the crack evidence. Harris indicated even though petitioner gave a statement regarding crack, petitioner was not charged with crack possession because no crack was located. Counsel did not object or request a limiting instruction at this time apparently because he had previously objected and the court had given a limiting instruction regarding the evidence.
In closing argument, the solicitor stated:
The only evidence in this case is that the defendant profits by selling this garbage on our streets. And the only evidence is that he uses other people to sell this garbage as well as other types of trash and drugs on our streets, and he profits from those people.
... is the defense that the defendant was cutting wood, is the defense that he doesn't deal in marijuana he only deals in crack ...
Defense counsel, in closing argument, also discussed the crack cocaine evidence.
The jury found petitioner guilty as charged. Counsel's motion for a new trial based on previous objections that the crack cocaine evidence was irrelevant to the case was denied.
Petitioner argues the extensive crack cocaine evidence was inadmissible and prejudicial.
We find the crack cocaine evidence was inadmissible under Rule 402, SCRE, which states that evidence that does not relate to the crime charged, is irrelevant and inadmissible. The crack cocaine evidence did not bear on the crime charged, which was PWID of marijuana. Irrelevant evidence that was admitted by the trial judge is subject to a harmless error analysis upon appellate review. State v. Langley, 334 S.C. 643, 647, 515 S.E.2d 98, 100 (1999). We find the error harmless because there was sufficient evidence presented to prove the PWID of marijuana charge. Investigator Harris testified that petitioner dropped a bag while he was chasing petitioner in the woods. Another officer picked up the bag, which contained a scale, plastic baggies, and 37 grams of marijuana.
*160 Accordingly, we find that the introduction of the irrelevant crack cocaine evidence did not prejudice petitioner's conviction on the PWID of marijuana charge.

Conclusion
We find the trial court lacked subject matter jurisdiction over the charge of PWID marijuana within proximity of a school. We further find the admission of the crack cocaine evidence was a harmless error. Accordingly, petitioner's conviction for PWID is AFFIRMED, and petitioner's PWID within the proximity of a school is REVERSED.
WALLER and PLEICONES, JJ., concur.
MOORE, J., concurring in part and dissenting in part in which BURNETT, J., concurs.
Justice MOORE, (concurring in part and dissenting in part):
I respectfully dissent from the portion of the majority's opinion that reverses appellant's conviction for PWID within the proximity of a school.
Amending the indictment for PWID within proximity of a school to list a school rather than a church did not change the nature of the offense charged. State v. Lynch, 344 S.C. 635, 545 S.E.2d 511 (2001) (indictment may be amended provided such amendment does not change nature of offense charged). Prior to and after the amendment, appellant was charged with violating S.C.Code Ann. § 44-53-445 (2002), the statute prohibiting the possession of drugs with the intent to distribute within the proximity of a school. The possible punishment appellant faced did not change, nor did the amendment alter the charge in any fashion other than to correct a scrivener's error naming a church instead of a school. See, e.g., State v. Batson, 261 S.C. 128, 198 S.E.2d 517 (1973) (amendment of indictment to insert name of agent to whom defendant allegedly sold LSD did not change nature of offense charged and was permissible); State v. Jones, 211 S.C. 319, 45 S.E.2d 29 (1947) (amendment correcting misnomer as to name of victim in indictment charging assault with intent to kill was not error where defendant was not misled and nature or grade of offense was not changed).
Accordingly, because the amended indictment contained the necessary elements of the offense, did not change the nature *161 of the offense charged, and sufficiently apprised appellant of what he must be prepared to meet,[3] the trial court had subject matter jurisdiction over the offense of PWID marijuana within proximity of a school. See Brown v. State, 343 S.C. 342, 540 S.E.2d 846 (2001).
I concur with section II of the majority opinion, which affirms the trial court's ruling regarding the admission of crack cocaine evidence.
Accordingly, I would affirm appellant's convictions for PWID marijuana and PWID marijuana within proximity of a school.
BURNETT, J., concurs.
NOTES
[1]  S.C.Code Ann. § 44-53-445 (2002) provides:

It is a separate criminal offense for a person to distribute, sell, purchase, manufacture, or to unlawfully possess with intent to distribute, a controlled substance while in, on, or within a one-half mile radius of the grounds of a public or private elementary, middle, or secondary school; a public playground or park; a public vocational or trade school or technical educational center; or a public or private college or university.
[2]  378 U.S. 368, 84 S.Ct. 1774, 12 L.Ed.2d 908 (1964).
[3]  While arguing against the amendment, counsel for appellant admitted appellant was clearly on notice from the indictment that the State proposed to try appellant under the PWID within proximity of a school statute.
