Fix adding iterations outside range in Flow