fixing jslint warnings