fix bug due to 0 being falsey in JS