Loop index needs to be var scoped to avoid possible concurrency problems.
Merge pull request #66 from mz83/var_scope

Loop index needs to be var scoped to avoid possible concurrency problems...