Fixed syntax error and fixed jshint errors.