fixing jslint errors