A new report says the city isn't doing enough to keep dangerous criminals out of public housing buildings, but NYCHA says it's a complicated issue.

The report from the Department of Investigation is a follow-up to one from 2015 that found NYCHA and the NYPD failed to deal with criminal tenants.

The DOI says the NYPD is now doing its part to notify NYCHA of residents arrested on public housing property, but says the Housing Authority isn't using tools at its disposal to evict tenants who commit crimes.

"We are not talking about a lot of people, but a small number of people are making NYCHA unsafe for the hundreds of thousands of law-abiding tenants," said Mark Peters, commissioner of the Department of Investigation.

"It's a very complicated issue," said Dan Hafetz, senior adviser to general counsel for NYCHA. "Evicting whole families who are innocent and are totally blameless of any wrongdoing is really serious. It's not something that NYCHA takes lightly."

The Housing Authority says it likes to focus its resources on targeting dangerous criminals while sparing families who often have low income and young children.