Minor changes in js for checkboxes