fixed bug with checkboxes