Ernesto Galarza went to court twice and won.
He stood trial on a drug conspiracy charge and a Lehigh County jury found him not guilty.
The New Jersey native sued the officials who improperly held him on immigration charges after his arrest and changed the way local law enforcement agencies work with federal immigration authorities.
But more than eight years after he was arrested at an Allentown construction site where police suspected his boss was selling drugs, the experience is still dragging him down.
It was by chance that Galarza, 42, of Fountain Hill, discovered the crime was still on his record.
Galarza traveled in November to Joint Base McGuire-Dix-Lakehurst, a sprawling New Jersey military installation shared by the Air Force, Army and Navy, to meet his son Sebastian, who had returned from an overseas deployment with the Marines.
After Galarza provided information for a background check to enter the base, security officials told him he had to leave because they found a felony conviction on his record, handing him a letter citing the 2009 drug charge of which he was acquitted.
"Your continued presence on this installation is detrimental to the maintenance of good order and discipline," the letter from the supervisor of the base's security forces said.
"Do you know how much of an embarrassment that was?" Galaraza said, recalling that he was escorted from the base and had to wait for his son near the gate.
Galarza is not alone in the humiliation of such a mistake. Although defense lawyers say they're rare and Pennsylvania's criminal history record-keeping is better than some other states, errors cost people jobs, keep them from renting homes and bar them from volunteer opportunities.
A Morning Call investigation using state court records and inquiries with the Administrative Office of Pennsylvania Courts and Pennsylvania State Police revealed Galarza's criminal record did, in fact, contain an error regarding the drug charge. State police spokesman Ryan Tarkowski said the agency has since researched Galarza's case and corrected his record.
He told The Morning Call state police aren't sure how the "technical issue" that led to the error on Galarza's record occurred. State police would not provide information about how many people have pointed out mistakes in their records, requiring the newspaper to file a Right-to-Know request, to which state police have 30 days to respond.
Galarza has pleaded guilty to misdemeanors related to drug possession, a car crash and drunken driving since 1999, but those would not have prevented his access to the military base, a spokesman said, and Galarza knew the felony drug charge could not be held against him.
In the days that followed, Galarza called his lawyer, who told him the felony on his record was likely the result of a clerical error. He said Galarza could apply for an expungement because he was found not guilty, but that would come with a cost that Galarza said he couldn't afford.
Galarza said he also realized that the erroneous criminal record was likely the reason he hadn't been able to find work aside from temporary positions despite a resume listing more than a decade of experience as a forklift operator and truck technician, among other jobs.
Galarza's experience highlights many of the reasons consumer advocates and lawmakers have focused on improving the accuracy of criminal records and mitigating the impacts that such records, correct or not, can have on people who have been cleared of crimes or long ago served their sentences.
"He's not the only one. We don't have any good way of knowing how often things like that happen," said Michael Schwoyer, a former prosecutor who serves as Pennsylvania's representative in a national effort to draft legislation ensuring criminal records are accurate. Schwoyer is deputy chief of staff for legislation and policy to state Rep. Frank Dermody, the House Democratic leader.
Pennsylvania's criminal record-keeping is better than many states, Schwoyer said, but there are still errors and a significant number of incomplete records. A 2014 Justice Department survey of state criminal history records found more than 280,000 partially processed or unprocessed records in Pennsylvania.
There are mechanisms in place, however, for people to challenge what they believe to be mistakes on their rap sheet. And the state built in another safeguard, requiring companies that use criminal history information to conduct background checks for employers or others to receive monthly updates so that they can remove or amend records that have changed.
That's part of the reason Pennsylvania records are more accurate, said Sharon Dietrich, a lawyer for Community Legal Services in Philadelphia who represents people who have been denied employment because of faulty criminal records.
Dietrich said that when she encounters problems with criminal records, it's usually in decades-old cases in which the exact details of the outcome weren't recorded.
"Back in the day, people didn't have access to criminal records for every use, so there wasn't a sense that accuracy mattered all that much," Dietrich said.
Errors also can occur when a case takes an unusual route to disposition, she said. That appears to be what happened in Galarza's case.
Galarza was working at a construction job, one of three he held at the time, replacing the floors in a house near North Sixth and Chew streets in November 2008. Allentown police swept in to arrest the contractor he was working for — a Dominican immigrant suspected of dealing drugs, as he made a sale to an undercover officer — court records said.
Galarza, his boss and two other men were charged with conspiracy to distribute cocaine and held in Lehigh County Jail. Federal immigration officials had Galarza held there for four days after he posted bail on the mistaken belief that he was from the Dominican Republic and in the country illegally. Galarza, a U.S. citizen, was born in Perth Amboy, New Jersey.
In a federal civil rights lawsuit filed on Galarza's behalf by the American Civil Liberties Union of Pennsylvania, he received settlements from the city, county and federal government totaling $145,000, though Galarza said he received only a share of the money. He also won a decision from the 3rd U.S. Circuit Court of Appeals in 2014 that local law enforcement agencies aren't required to hold people suspected of being in the country illegally for federal authorities.
In the criminal case, Galaraza said his lawyer persuaded him to plead guilty to the conspiracy charge because it would be faster, less expensive and likely to end in a sentence of probation. But on Jan. 11, 2010, when he went to court to enter his plea, Galarza said he told the judge he didn't want to plead guilty because he wasn't guilty.
"He ripped up the papers," Galarza said, recalling that Judge James T. Anthony ordered his lawyer to get ready for a trial.
Three months later, a jury found Galarza not guilty of conspiring with his boss to sell cocaine.
The docket sheet for Galarza's drug case shows two entries for Jan. 11, 2010: one in which Galarza pleaded guilty, and one in which the plea was withdrawn. It's also the date the Air Force cited in the letter Galarza was given when he was kicked off the base in New Jersey.
A spokesman for the military base said security forces there use the National Crime Information Center, a database maintained by the FBI that consolidates criminal history records compiled by state police and other agencies in all 50 states.
The docket for Galarza's case lists his acquittal the day the jury returned its verdict, April 14, 2010. Kimberly Bathgate, a spokeswoman for the Pennsylvania court system, said the outcome was reported to state police for inclusion in its criminal history database. Tarkowski, the state police spokesman, said the update was received, but it's unclear why it was not added to the database.
He said it appeared to be a technical issue, adding that state police are confident that the error was not the result of a wider problem with its criminal record system.
Bathgate said when Galarza's case was moving through the court system in 2010, changes in final outcomes, such as Galarza withdrawing his guilty plea and winning an acquittal, had to be manually entered into the state police database. Since 2013, such updates have been automatic.
Tarkowski said anyone can pay $10 to see a copy of their Pennsylvania criminal history and challenge anything they think is incorrect.
Even within Pennsylvania's system, Tarkowski said, the state police have nearly 226,000 files in which a record of a person's arrest and the final outcome of the charges cannot be matched. That's down from 2014, when Pennsylvania last reported to the Justice Department.
The reason is that some cases are assigned a tracking number when the individual is arrested and then improperly assigned a second tracking number when the case moves to district court, creating divergent records. The state police are working with the court system and hope to use a Justice Department grant to develop a solution to the problem, Tarkowski said.
But Dietrich, of Community Legal Services, said there's no guarantee that an incorrect record will disappear completely even if a person challenges it successfully with the state police.
The FBI requires changes to its database to be made by the state police agency that originally created a criminal record, and it's difficult for individuals to confirm that an update has been added, Dietrich said.
"You kind of live in hope that they got it and they did it," she said.
Private background check services, which purchase criminal history records in bulk, are another place where errors can haunt people. They are regulated under the Fair Credit Reporting Act, but there are so many that there's no complete list, Dietrich said. And while employers are required to tell job applicants when they're being rejected on the basis of a criminal record and give them a chance to contest the record, not all do, Dietrich said.
For those who are eligible, expungement is the best way to shed the stigma of a criminal record, Lehigh County Chief Public Defender Kimberly Makoul said. People who complete Pennsylvania's program for first-time non-violent offenders have their arrest records expunged automatically.
Others convicted of summary offenses, such as public drunkenness or criminal mischief, can ask a court to order their records erased after five years of steering clear of trouble. Last month, Pennsylvania gave people convicted of non-violent misdemeanors, including drug possession or minor thefts, the ability to petition a court to seal their records after 10 years of good behavior.
Dietrich hopes to see that expanded to automatically expunge acquittals after 60 days, summary offenses after five years and non-violent misdemeanors after 10 years with a bill called Clean Slate that her organization is proposing.
Galarza said he believes the mistake on his record has held him back financially, relegating him to $10-an-hour temporary jobs when he previously made $25 an hour or more as a technician.
"That mistake is costing me my life," he said. The corrected record, he hopes, will lead to better job prospects.
For millions of people, criminal records can affect their ability to get housing, buy a gun or be involved with their children's sports leagues, Schwoyer said.
"We all have an interest in making it as accurate as possible," he said. One organization, the Uniform Law Commission, is working toward a proposal that could make criminal records more like credit reports, he noted. Then, people across the country could police their own files and find inaccuracies before they become embarrassments.