jshint errors fixed