fixing issues with checkboxes