fixed errors shown by jshint