fix jshint errors on generator.js