bugfix for iteration problems