CONCORD, N.H. (AP) — The head of the Massachusetts motor vehicle division has resigned for failing to terminate the commercial driving license of man whose collision with a group of motorcyclists in New Hampshire left seven dead.

Volodymyr Zhukovskyy, 23, on Tuesday pleaded not guilty to seven counts of negligent homicide.

Massachusetts Department of Transportation Secretary and CEO Stephanie Pollack said in a statement that the RMV failed to act on information provided by the Connecticut Department of Motor Vehicles about an incident involving Zhukovskyy that should have cost him his license. As a result, she accepted the resignation of Erin Deveney.

Connecticut prosecutors said Zhukovskyy was arrested May 11 in a Walmart parking lot in East Windsor after failing a sobriety test. Zhukovskyy's lawyer in that case, John O'Brien, said he denies being intoxicated and will fight the charge.

Zhukovskyy, a driver for a transport company who has a history of traffic arrests, was ordered Tuesday to remain in preventive detention, with a judge saying his driving record poses a potential danger to the public and himself.

The plea was entered by Zhukovskyy's attorney Melissa Davis in Coos County Court in Lancaster, New Hampshire. Zhukovskyy remains behind bars there. Davis didn't immediately return calls seeking comment.

The Dodge pickup Zhukovskyy was driving was towing a flatbed trailer and collided with the motorcycles in Randolph early Friday evening, investigators say. He was driving erratically and crossed the center line, according to criminal complaints released Tuesday.

A survivor of the crash said the trailer wiped out most of the bikers behind him.

Zhukovskyy was arrested Monday morning at his home in Massachusetts and handed over to New Hampshire authorities after a court appearance that day.

Jury selection is scheduled to begin Nov. 8, with the trial running through December.

Zhukovskyy was also arrested on a drunken driving charge in 2013 in Westfield, Massachusetts, state records show. He was placed on probation for one year and had his license suspended for 210 days, The Westfield News reported.

Zhukovskyy's father, who goes by the same name, told the Boston Herald that his son is a Ukrainian national and has permanent resident status in the U.S. The younger Zhukovskyy's court file includes a letter dated Sunday from a deportation officer from Immigration and Customs Enforcement requesting details on his 2017 heroin and cocaine convictions.

Records from the Federal Motor Carrier Safety Administration indicate that the company Zhukovskyy was driving for at the time of the motorcycle crash, Westfield Transport, has been cited for various violations in the past two years, MassLive.com reported.

Phones rang unanswered at the company. The owner has previously said he was cooperating with the investigation.

The crash victims were members or supporters of the Marine JarHeads, a New England motorcycle club that includes Marines and their spouses and ranged in age from 42 to 62. Four were from New Hampshire, two from Massachusetts and one from Rhode Island.

JarHeads president Manny Ribeiro, who survived the crash, said he just remembers an "explosion" and the trailer from the truck wiping out most of the bikers behind him. The crash would not have been so deadly, he said, if not for the trailer.

After the crash, Ribeiro recalled seeing Zhukovskyy "screaming and running around" in the road before authorities arrived and took him away.

The dead were identified as Michael Ferazzi, 62, of Contoocook, New Hampshire; Albert Mazza Jr., 59, of Lee, New Hampshire; Desma Oakes, 42, of Concord, New Hampshire; Aaron Perry, 45, of Farmington, New Hampshire; Daniel Pereira, 58, of Riverside, Rhode Island; and Jo-Ann and Edward Corr, both 58, of Lakeville, Massachusetts.