Fix the loop value position bug