fixes minor bool check in js for jslint