fixed jshint errors/warnings