Homeland Security could do more to protect election infrastructure, according to a new report by the department’s watchdog.

The report from the inspector general, out Wednesday, said progress had been made but Homeland Security, the department charged with protecting elections and the back-end voting machine infrastructure, still “does not have dedicated staff” focused on election infrastructure. The department’s new agency, Cybersecurity and Infrastructure Security Agency (CISA), which under its creation last year was charged with reducing the nation’s cybersecurity risks, was also “not adequately staffed” to support state and local election officials to help secure election infrastructure.

Making matters worse, the 102 advisors tasked with protecting more than a dozen critical infrastructure sectors — including elections — have shifting priorities, and are often told to “focus on the next widespread or known event,” such as preventing school shootings and preparing for major events.

From the report:

CISA officials acknowledged that staffing shortages have hindered DHS’ efforts to secure the Nation’s election infrastructure. At the same time, they advised that the Department is “taking actions to alleviate” the concerns by hiring more cybersecurity advisors.

Aside from understaffing, security clearances are slow to process for local and state officials, making it difficult to share with election staff on the ground classified information about threats faced. Meanwhile, many of those officials reported a “mistrust of federal government assistance,” which also hampered Homeland Security’s efforts to provide security assessments, according to the watchdog.

“Addressing these issues is essential for continued improvement in the services, outreach, and quality of information DHS shares with election stakeholders,” said the report.

It comes just weeks after the Justice Department and Homeland Security said there was “no evidence to date” that any foreign government had a “material impact” on voting machines or infrastructure during the 2018 midterm elections. Security experts have for years complained that the older and outdated electronic voting machines can easily be hacked to alter the results. Many of these machines don’t print a paper confirmation, making it difficult or impossible to know if votes were accurately counted.

With less than two years before the 2020 presidential election, the inspector general said the department has more work to do.

The report said that despite federal requirements, Homeland Security “has not completed the plans and strategies critical to identifying emerging threats and mitigation activities, or established metrics to measure progress in securing the election infrastructure.” The watchdog said the department had to contend with senior leadership turnover — including two department secretaries in a single year — that has left the department without sufficient guidance or planning.

“Until such issues are addressed and resolved, Homeland Security cannot ensure effective guidance and a well-coordinated approach to securing the Nation’s election infrastructure,” the report said

The report wasn’t all bad news. The watchdog said the government’s assistance to state and local governments has improved, with a greater number of cybersecurity reviews and risk assessments in more states. The watchdog also praised the government for improving the quality of information to election officials, despite hold-ups to security clearance.

Homeland Security said it agreed with the watchdog’s five recommendations.