North Carolina’s tax collectors are refunding money to thousands of taxpayers whose electronic payments were wrongly subtracted twice from their bank accounts.

The Department of Revenue said Thursday the error happened because a high volume of 2017 payments were being made around last week’s filing deadline. But the agency says the roughly 6,400 taxpayers affected were making payments for earlier tax years, such as on installment plans.

Department spokesman Schorr Johnson says the taxpayers are being contacted about the problem and duplicate payments are being refunded. The department also will reimburse overdraft fees such a payment could have caused.

The department says 629,000 tax payments were submitted to the state last week.