fixed jslint warnings