removed some JSLint warnings