fixed some jslint warnings