fixes a bug where checkboxes did not automatically uncheck