fix lint errors
correct more jslint errors