fix errors reported by jshint