fixed the checkboxes selection