iterfield: bug fix and cleaned

Signed-off-by: Kirsten Sachs <kirsten.sachs@desy.de>