WASHINGTON (CNN) -- U.S. intelligence officials said Thursday that they have added safeguards to prevent the government from unlawfully spying on U.S. citizens after a routine check of the system "detected issues that raised concerns."

The National Security Agency collects mostly international telecommunications and e-mails.

Intelligence officials declined to specify the nature of the problem. But in a prepared statement, Director of National Intelligence Dennis Blair said that on occasion, the National Security Agency "has made mistakes and intercepted the wrong communications."

Officials characterized the wrongful intercepts as inadvertent and not nefarious. But some lawmakers said the matter reveals holes in the systems Congress established last year to ensure that the country's vast intelligence gathering bureaucracy would not be used unconstitutionally to collect information about U.S. citizens.

"These are serious allegations, and we will make sure we get the facts," said Sen. Dianne Feinstein, D-California, chairwoman of the Senate Intelligence Committee. Feinstein said she will hold a hearing on the matter.

At issue is the activities of the National Security Agency, which collects "signals" intelligence, typically international telecommunications and e-mails.

In his statement, Blair said the NSA goes to great lengths to ensure the privacy and civil liberties of U.S. citizens but has made occasional mistakes.

"The number of these mistakes are very small in terms of our overall collection efforts, but each one is investigated, the Congress and the courts are notified, corrective measures are taken, and improvements are put in place to prevent reoccurances."

Blair said the lawful intercepts "have played a vital role" in thwarting terrorist attacks since September 11, 2001, when hijacked planes crashed into the World Trade Center in New York, the Pentagon in Washington and a field in Pennsylvania. More than 2,700 people were killed.

A Justice Department spokesman said the department and the NSA were conducting routine oversight when they detected issues that raised concerns.

"The Justice Department immediately notified the Foreign Intelligence Surveillance Court and took comprehensive steps to correct the situation and bring the program into compliance," Justice Department spokesman Dean Boyd said.

The department also briefed members of the Intelligence and Judiciary Committees of the House and Senate and other appropriate members of Congress, he said.

A former senior intelligence official said that intelligence collection systems are "technically complex operations" and that the NSA "never claimed to be perfection."

"It is a complex global communications grid, and you have to have lots of processes and checks to make sure that you are only targeting those communications of non-U.S. persons reasonably believed to be outside the United States. That is the challenge."

The fact that auditors discovered the problem and reported it and the bureaucracy made adjustments to prevent a reoccurrence is an indication that the program is working, he said.

The matter was first reported by the New York Times, which quoted several intelligence officials as saying the NSA has been engaged in "overcollection" of domestic communications of Americans. The Times quoted officials as saying the practice was significant and systemic, although one official called it unintentional.