fixed logic for checkbox resulting in opposite value