fixed lint errors
fixed jslint errors