Fix a bug with checkboxes in GUI