fix bug with checkboxes