run JSLint, fix some problem