db entity iterator fix