Fixed run state propagation problems in for loops