Resolved a bug found when handling checkboxes