fix typo and jslint error