fix selection when using checkboxes