fix jshint issue, optimize code in loop
Merge pull request #276 from knalli/bugfix/jshint

fix jshint issue, optimize code in loop