Corrected js for checkboxes