Fix indefinite iterative execution