fix error when checkbox is unset