Get the correct value for checkboxes