fix foreach bug at vm modle.