fixed some jslint issues