Two immediate options
- Change the order of the
ifstatements so they are in the order you prefer them to be checked.
- or better, test the state of all checkboxes in each
ifstatement; that is, don’t just test if some are checked and assume the rest are unchecked — test the unchecked checkboxes as well. Be explicit!