Prisoner advocates are criticizing the implementation of a Trump-era law first hailed as a way to reduce the federal prison population by allowing certain nonviolent offenders to earn early release, saying it has been inadequately rolled out and hampered by bureaucratic holdups.

Adding to the frustration: A new computer app created to automatically calculate inmates’ “time credits” — a program under the First Step Act that can move up their release dates — suffered a technical glitch as it was launched this month.

Instead of recognizing inmates’ credits accrued under the law, some said the opposite occurred, which suddenly shifted their release dates to a later time than they had anticipated. In extreme cases, some prisoners already released to halfway homes were erroneously told that the new calculations indicated they were deficient in the necessary credits and they would have to return to prison.

Federal Bureau of Prisons Director Colette Peters told NBC News on Thursday that prisoners’ time credit calculations are now accurately reflected and it was “unfortunate we had some IT glitches as it rolled out.”

“When you move from a human calculation to an automation, you always hope that the error rate drops, and so that’s our hope as well going forward,” she said.

But prisoner advocates say this misstep is indicative of the larger failures of a law that has given federal inmates hope they could qualify for early release.

“The communication of it all has just been atrocious,” said Walter Pavlo, president of the consulting firm Prisonology LLC, who documented cases of prisoners in halfway homes who almost had to return to prison before the recent computer program errors were resolved.

“They may have ended up fixing it, but it’s still traumatizing to people,” he added.

In 2018, then-President Donald Trump signed the bipartisan First Step Act as a way to reduce recidivism and give an opportunity for “minimum-risk” or “low-risk” offenders to receive reduced sentences. In particular, the law’s supporters believe it can cut particularly harsh sentences for nonviolent drug offenders and lessen the racial disparities affecting people of color in the criminal justice system.

Time credits are granted based on an inmate’s participation in prison and work programs related to anger management, mental health, financial literacy and other topics that seek to address behavior and instill personal skills. As the credits are calculated and it is determined they equal the time left on the sentence, the inmate can be transferred out of prison into “pre-release custody,” such as a halfway house or home confinement. Some may also be eligible for supervised release, like probation.

Since the law was enacted, prisoners’ time credits have been logged by their case managers. But deficient staffing levels at prisons has led to a backlog in the tracking of credits, as well as insufficient programming opportunities for inmates to even collect credits.

But the new computer app was viewed as a positive development in ensuring inmates’ credits don’t fall through the cracks.

Pavlo said that inmates who were affected were ones who had not filled out a First Step Act-related survey when they first entered the program, which would have been required, but many didn’t have access to computer terminals, particularly as Covid lockdowns kept prisoners confined.

“If there were inmates being told that they had to take a survey as part of a program for early release, believe me, they would have all been on line to take it,” he said. “But that wasn’t happening. They didn’t realize it was a requirement.”

Peters, who led Oregon’s prison system for a decade before she was named BOP director in August, said the time credit program is undergoing a review of its regulations, and policy changes are forthcoming, as well.

An internal memo sent last month to inmates obtained by NBC News regarding the time credit “auto-calculation app” mentions that completion of a survey is a requirement to earn time credits and that inmates who are within 18 months of release might no longer earn time credits that would reduce their prison term. Prisoner advocates said that guideline appears arbitrary.

In response, Peters said, “There was already confusion around time credits, and so our hope is that in the coming days or weeks when the regulation’s approved, that we’ll be able to clear up a lot of that confusion and then that the automation glitches will be cleared up by then.”

Patricia Richman, the national sentencing and resource counsel for the Federal Public and Community Defenders, which represents defendants charged with federal crimes, said she’s concerned any changes will only limit the ability to earn time credits and that release dates will continue to move significantly later.

“I hope that what happened with the rollout was a ‘glitch,’ not a feature of the new autocalculate app. But I’m skeptical,” she said. “Nearly four years after the FSA was signed into law, BOP still lacks a formal program statement” on time credits.

With whatever policy is put forth by Peters, Pavlo said, the key will be how it is communicated to prison staff and how they communicate it to prisoners.

“I do think they’re going to iron all this out, but it’s going to take time,” he said. “There’s a lot of tensions inside of prisons because they’re wanting to go home and they don’t know what’s happening.”