WASHINGTON (AP) — The Department of Homeland Security will be working with states to ensure they follow proper protocols when issuing safety alerts and can quickly retract incorrect alerts, like Hawaii's warning of a ballistic missile over the weekend, Secretary Kirstjen Nielsen said Tuesday.

Sen Mazie Hirono, D-Hawaii, said it's clear that human error initiated the false alert. But she worries that system failures allowed it to go uncorrected for too long, nearly 40 minutes.

"That seems to point to some communication and other types of failures we ought to be addressing," Hirono said during a Senate Judiciary Committee hearing examining DHS.

Hawaii residents received cellphone alerts Saturday warning of an incoming ballistic missile strike. State officials later said someone doing a routine test during a shift change at the Emergency Management Agency mistakenly hit the live alert button.

"This had the potential for being totally catastrophic," Hirono said.

Nielsen said her agency was talking with the state about how it can improve its alert system.

"Initial lessons learned, we would work with the states, particularly in this threat, to ensure that they are connected to those who can quickly verify whether that threat is real or not," Nielsen said. "In that case, it would be the Department of Defense."

Nielsen said she was unaware the state didn't have protocols in place to address false alerts. Hirono asked her to ensure every state has in place functioning retraction systems.

"We will work with states to ensure that, yes," Nielsen replied.