ALBANY, N.Y. (AP) — New York’s attorney general has changed the rules of a state gun buyback program after a participant exploited the system by using a 3D printer to make firearm parts in bulk that he then turned in for $21,000 in gift cards.

The seller, who identified himself by a pseudonym, said he traveled from West Virginia to a gun buyback Aug. 27 in Utica, New York, to take advantage of a loophole in the program — and to demonstrate that buybacks are futile in an era of printable weapons.

At the buyback, he turned in 60 printed auto sears, small devices that can convert firearms into fully automatic weapons. Under the rules of the buyback, hosted by Attorney General Letitia James’ office and city police, that entitled him to $350 for each of the printed parts, including a $100 premium, since they were deemed “ghost guns” lacking serial numbers.

The seller, who declined to provide his real name, said in an email to The Associated Press on Monday that the prospect of making money was enticing, but that the big reason he took part in the buyback was to send a message.

He called the idea of buybacks “ridiculously stupid,” adding that “the people running this event are horribly uneducated about guns, gun crime, and the laws surrounding the regulation of guns.”

James’ office said it responded to the exploited loophole by giving buyback personnel more discretion to determine the value of weapons being handed in, and setting a standard that all 3D-printed guns accepted by the program must be capable of being fired more than once.

The new rules were in place by Sept. 17, when the attorney general’s office hosted a gun buyback in the Syracuse suburb of Camillus.

“It’s shameful that this individual exploited a program that has successfully taken thousands of guns off the streets to protect our communities from gun violence,” James’ office said in a statement.

Buybacks are a popular way for government officials to try to get guns off the streets, typically with a promise of no questions asked, and amnesty for someone who turns in an illegal weapon.

Some firearms turned in to those programs are legally owned. Others are relinquished by people who aren’t allowed to own weapons or are turning in guns that have been illegally altered.

The rule change by James comes as state and federal officials attempt to deal with the proliferation of ghost guns. President Joe Biden announced in April changes to the definition of a firearm under federal law to include unfinished parts, which would include those made by 3D printers.

The New York attorney general’s office has been hosting buybacks since 2013. James has recently warned that ghost guns are fueling a “gun violence epidemic” and sees buybacks as part of the solution, as do police forces in Syracuse and elsewhere.

“We have partnered with local police throughout the state to recover more than 3,500 guns, and one individual’s greedy behavior won’t deter us from fighting for public safety for all New Yorkers,” her office said.