resolve loop initial declarations error