fix a compile error: loop initial declaration