Fix during loop, close #1140