A lawyer is warning Corrections could face another raft of compensation claims after a court ruled it made mistakes calculating prison terms.
So far 15 offenders have brought claims against the Ministry after a 2016 Supreme Court ruling showed Corrections was wrongly calculating sentence lengths for prisoners who had been on remand before sentencing.
One of the offender's lawyers, Douglas Ewen, said there could be even more crying foul after a Court of Appeal decision in December ruled Corrections had made another mistake with one of his clients.
In June 2017 Belinda Sutherland was sentenced to five months home detention for refusing to provide a blood sample.
However, just over a month later she cut off her electronic bracelet and absconded from her home.
She was taken into custody with two extra charges laid and an application to change her home detention sentence for one of imprisonment.
In September 2017 she was sentenced to a prison term, with Judge Rowe commenting she'd be out soon on account of time spent in remand.
"You have, as I say, spent four months in custody before being sentenced by Judge Morris.
"You have been in custody for about another two months since being charged with the breaches of home detention so in many ways the 16 months' sentence I impose today will largely have been served by you. You will have about two months to go," he said.
That would have been November. However, Corrections considered the time spent in custody waiting for re-sentencing didn't count.
According to a recently-released Court of Appeal decision "Corrections was following a policy at this time, supported by a number of High Court decisions, that the contested period was not to be taken into account in these circumstances."
It noted that Corrections believed it was up to the sentencing judge to take the remand time into account when deciding on the length of the prison sentence.
"Ms Sutherland was caught between the two different approaches, the consequence being no recognition at all for the two months in custody.
In December 2017 Ms Sutherland challenged Correction's calculations and a judge ordered she be released while the legal issues were worked through.
After a High Court decision ruled against them Corrections took the matter to the Court of Appeal, which just before Christmas 2018 ruled they were mistaken in their approach.
Ms Sutherland's lawyer, Douglas Ewen, said the decision showed it was an administrative task for Corrections to do.
"It meant the time she spent because of the misallocation of those two months was unlawful time in custody so it was about three weeks of time that were unlawful and therefore give rise to a claim for compensation.
It's not the first time Corrections has been found to be wrong in working out sentence lengths.
In 2016 the Supreme Court ruled it had been making mistakes when calculating sentences for prisoner who had been on remand before sentencing.
That has led to 15 compensation payments, but Mr Ewen said he had more clients with claims to resolve.
Corrections paid out $50,000 to his client Michael Marion after the decision.
Mr Ewen said the number affected by the latest decision would likely be substantially larger.
"Reviews of sentence for breach of home detention are literally a matter of daily occurrence in the District Court.
"Five days a week judges will be dealing with this issue so there will be a lot of people who will have been remanded in custody pending reviews of sentence for whom Corrections will not have allocated back time towards the resulting sentence."
"I struggle to grasp the numbers of how many people may be prejudicially affected by this but it will be a very large number I suspect."
Mr Ewen said his client, alongside anyone else who served unlawful time because of the mistake, would be eligible for compensation.
Corrections brings forward prisoner release dates
Corrections' deputy national commissioner, Andy Milne, said it had been unclear whose responsibility it was to take the time into account when determining release dates in similar cases.
"Our view, which was consistent with several previous High Court decisions, was that it was the sentencing judge's responsibility to take the remand time into account when deciding on the length of the prison sentence to impose for a person who had had their community sentence cancelled."
He said Corrections had taken the matter to the Court of Appeal to clarify which approach was correct.
"As a result of the decision we have been working through the judgement to confirm the operational impact.
"This involves recalculating and verifying statutory release dates for prisoners and sentence end dates for offenders in the community to ensure that prisoners are not detained unlawfully and offenders in the community are not subject to conditions for longer than they are required to be."
"Some prisoners have had their statutory release dates brought forward, with 17 prisoners (of a total 9690 at 24 December) released by the end of 24 December 2018.
"Release plans were prepared for all of these prisoners to ensure that they were well supported and that any risk to community safety was mitigated."
He said another prisoner was also released on December 31.