The Department of Veterans Affairs has mistakenly declared thousands of veterans to be deceased and canceled their benefits over the past five years, a new snafu to emerge at the embattled department.

The VA has made the error more than 4,000 times over a half-decade because of employee mistakes or erroneous cross-checking of data by the department’s computers, among other reasons, according to correspondence between the VA and the office of U.S. Rep. David Jolly (R., Fla.) reviewed by The Wall Street Journal. The VA changed its procedures to address the issue, but it isn’t yet clear whether the new system is effective.

“Although these types of cases represent a small number of beneficiaries in comparison to the millions of transactions completed each year in our administration of benefits, we sincerely regret the inconvenience caused by such errors and work to restore benefits as quickly as possible after any such error is brought to our attention,” a VA spokesman said in a statement.

It wasn’t immediately clear whether the latest data represented an increase in the error rate or what prompted the VA to tackle the problem.

Every year, about 400,000 veterans or others receiving VA benefits die and their awards are canceled, according to department statistics. Of the roughly two million veterans declared deceased in the past five years, 4,201 cases involved incorrect declarations that the VA eventually corrected before resuming payments to the still-living beneficiary.

The VA noted that such errors make up less than 1% of all benefits terminations each year and that the accuracy rate of terminations because of death is 99.83%, according to the department’s most recent figures. The department said it doesn’t keep records of the causes of the errors.

Over the past decade, the VA has used what is called the death match program to prevent people from cashing benefits checks sent to deceased veterans. In 2010, the VA’s inspector general said the program had led to 382 arrests and recovery of $40 million in fraudulent payments.

Under a new system instituted late last year, the VA sends a letter to the beneficiary believed to have died and waits 30 days for a response before terminating the benefits and declaring the person dead. The department said it doesn’t have statistics on whether the new system has reduced such errors.

Difficulty keeping track of veteran deaths poses other problems. In September 2015 the VA’s Office of Inspector General issued a report noting that about 35% of the department’s approximately 870,000 pending applications for enrollment into the VA health-care system as of September 2014 were for people reported as dead by the Social Security Administration.

The report noted that most of the pending records are likely outdated, though the record system makes it unclear. Such a convoluted system helps “create unnecessary difficulty and confusion in identifying and assisting veterans with the most urgent need for health-care enrollment,” the report said.

In March, the enrollment system updated more than 130,000 dates of death in conjunction with Social Security’s official rolls to cut back on pending applications.

Click for more from The Wall Street Journal.