js fix for checkboxes