If you ever donate an old smartphone, make sure you put it through a factory reset.

One electronics recycler in Colorado had to scrap tens of thousands of old, but perfectly usable iPhones because their previous owners forgot to deactivate the devices' anti-theft systems.

The Wireless Alliance disassembled 66,000 iPhones for parts over the last three years due to Apple's "activation lock" system, which can prevent thieves from accessing data on the device. The same feature can also help an iPhone's owner find the handset if it ever gets lost or stolen.

Unfortunately, the activation lock system can prevent electronics refurbishers from reselling an old, donated iPhone, according to the Colorado Public Interest Research Group (CoPIRG), a consumer advocacy organization. On Thursday, it released a report with data from The Wireless Alliance, which outlines how anti-theft systems from Apple and other smartphone makers pose a serious roadblock to making old electronics reusable again.

"Tens of thousands of otherwise good phones are junked and recycled each year because of the activation locks," the report says. "Last year alone, [The Wireless Alliance] noted that one in four iPhones they received still had the activation lock enabled."

Certainly, recycling an old smartphone for parts is better than simply trashing it and contributing to world's growing e-waste problem. But the most environmentally friendly option is to first find a way the device can be reused. The Wireless Alliance is among the companies that collect donated smartphones with the goal of either reselling or recycling them to keep the hardware out of landfills.

Over the past three years, it's collected more than 6 million cell phones through the help of donation boxes at schools, churches, and businesses across the US. "Unfortunately, if someone does not turn off the activation lock on their phone before they drop their phone in the donation box, their phone can't be reused as a whole device and will be unusable," according to CoPIRG's report.

On the iPhone, the activation lock is separate from the passcode you enter to unlock the device's screen. If enabled, Apple's anti-theft mechanism will be tied to the owner's iCloud account using their Apple ID and password. In the event the phone is lost, the owner can use iCloud to locate the device, and also remotely erase all the personal information from it.

However, the activation lock will keep the iPhone bound to the original owner unless the feature is deactivated. The same lock will also prevent any new owner of the device from initiating a factory reset. According to the Wireless Alliance, donated Samsung handsets suffer from a similar activation lock problem.

Apple has a guide on turning off its activation lock feature here, which largely consists of signing out of iCloud (Settings > [your name] > Sign Out) and factory re-setting your device (Settings > General > Reset > Erase All Content and Settings). There are a few other things you might want to do before wiping your iPhone; check them out here.

Allison Conwell, consumer advocate with CoPIRG and co-author of the report, said it's easy for people to forget about activation locks when donating their old devices. Unlike the passcode, the anti-theft mechanism doesn't appear on the phone's main interface.

The original owners "may have kept the phone in a drawer for five years, and wanted to do something nice by donating. But they didn't shut off the activation lock or do a factory reset," she told PCMag.

Conwell is hoping her report raises awareness about the problem. At a time when smartphone prices are reaching $1,000 or more, refurbished handsets can provide an affordable alternative to consumers on a budget.

"We always recommend a customer reset a phone to the factory settings, which is usually just a couple of taps in the [phone's] settings," Conwell added. "During that process, the activation lock will be disabled."

Whether it was really necessary for The Wireless Alliance to scrap the 66,000 iPhones is less clear. The company didn't immediately respond to questions about whether it had ever contacted Apple about the activation locks on the donated iPhones. But Conwell's report recommends both Apple and third-party recyclers work together on a system to address the problem for non-stolen smartphones.

Apple also has its own recycling program, which will refurbish old iPhones for resale. Before the phones are handed over for trade-in, an Apple employee will work with the original owner to ensure all information from the device is wiped, and that the activation lock is disabled.

Apple didn't immediately respond to a request for comment.

This article originally appeared on PCMag.com.