fix the position of declaring local variable.