error checking

added some error checking to the checkboes