fix typo and jshint error