fixed some JSLint errors