fix "for" statement's problem