A change in Philadelphia’s vaccine registration system should allow only people who are eligible for shots to register for COVID-19 inoculation through the city, closing a loophole that has allowed an untold number of people to get appointments improperly.

The fix comes as city health department staff canceled about 1,400 appointments from Sunday to Tuesday made by people who shouldn’t be receiving shots in Philadelphia, said James Garrow, a spokesperson for the health department. But people who live in the city and aren’t yet eligible due to age, profession, or health condition have still been able to bypass the vetting.

The majority of vaccination appointments for the city’s inoculation sites are made through emails to people who preregistered and are eligible to receive shots. Those emails include a link to a scheduling system, but there has been nothing to prevent those links from being shared with others, who can then use them to make their own appointments. Philadelphia officials have known for months about the problem. A member of the disgraced group Philly Fighting COVID said in an interview this week that its January clinic for health-care workers was flooded with thousands of improper appointments that had to be canceled.

The problem reached a crescendo in the last week, though, as ineligible people swarmed links for a FEMA-run clinic at the Convention Center that offers city residents about 6,000 doses a day. More than 100 appointments had to be weeded out for March 1 and 2, when shots were supposed to go to a select group of essential workers.

“I think everybody’s operating at scale and what were small problems before are now large problems that cities and states are now scrambling to fix,” Garrow said.

The 1,400 canceled appointments were identified as invalid largely because they were made by people with zip codes outside the city, Garrow said. Vaccine doses allocated to Philadelphia are supposed to go only to city residents. The task of culling appointments diverted staff away from epidemiological work and contact tracing efforts, Garrow said.

Restricted links are not a new technology, but for weeks Philadelphia officials have waited for a fix from Maryland Partnership for Prevention, the small nonprofit responsible for the registration software, PrepMod. As of Wednesday, the city will begin introducing registration links that expire after one use, Garrow said.

» READ MORE: Philly’s first federal COVID-19 mass vaccination site already is having to fend off people who aren’t eligible

“It is a single-use link,” he said. “Once it gets clicked that page that it would send you to no longer exists.”

The change won’t affect appointments already made, officials said.

It cost the city $204,000 to adopt PrepMod, but the Centers for Disease Control and Prevention covered the costs. The fix implemented this week was done at no cost to the city.

Maryland Partnership for Prevention did not return a call for comment Tuesday.

The city’s vaccination clinics give preference to less-vaccinated zip codes, as well as to people who are eligible due to their age or health reasons. But that effort to ensure equity was complicated by the onslaught of link-sharers.

Philadelphia is among the 27 states and jurisdictions that use PrepMod software to manage vaccine registration. The system was widely adopted based on the CDC’s recommendation because it can integrate with the federal agency’s system, but it has caused headaches nationwide. The system has overbooked appointments, given slots to people not yet eligible, and has sent incorrect scheduling reminders.

Just last week, Philly resident Matt Smith received an invitation from the city to be vaccinated. He is 25, healthy, and works from home in finance, he said. He went through the registration process after receiving a link for the city, but ultimately decided to cancel the appointment.

“I looked into what 1A or 1B was and that’s not me,” he said. “I sit in the same corner of my apartment 15 hours a day, and rinse, repeat.”

The shareable links, though, have been among the biggest problems associated with the system, and Philadelphia’s fix addresses just that issue.

Montgomery County health officials were so frustrated by their inability to control who could make appointments, they spent $15,000 to build their own fix, a unique code emailed to people sent the registration link. They have to use the code, called a token, to access the scheduling system, and have to show it when they get vaccinated. The code is linked to a specific person, said Megan Young, the county’s public health emergency preparedness coordinator, so staff can identify and turn away anyone using someone else’s code.

» READ MORE: Pa. counties are blaming ‘cumbersome’ state-provided software for vaccine registration problems

But the patchwork solution adds another complication to a digital registration system that disadvantages those who aren’t digitally savvy.

“Right now, it’s the best of a bad situation,” Young said. “It will never be perfect until PrepMod fixes its flaws.”

Montgomery County officials were not aware Tuesday that PrepMod had a solution for Philadelphia, but were planning a meeting with Maryland Partnership for Prevention on Wednesday.

Philadelphia is among the first in the nation to receive the module for restricted links, Garrow said. The software company will send out these more secure emails more slowly than the previous version, Farley said, so the city is also making phone calls to high-risk people on the list to help them make appointments.