fixed jshint warnings/errors