fixed errors to prevent jshint errors