fixed a bug with checkboxes