           //Reset the number of bonds and count from the EEPROM header
           bond_number = 0;
           eeprom_status = EEPROM.read(0);
-          if (eeprom_status != 0x00)
+          if (eeprom_status != 0xFF)
           {
             bond_number++;
             //Update the write offset to the correct number
             eeprom_write_offset = EEPROM.read(bond_number * BYTES_PER_BOND_IN_HEADER + 1);
-            if (0x00 != EEPROM.read(2))
+            if (EEPROM.read(2) != 0xFF)
             {
               bond_number++;
               //This is needed only if we wanted to add a 3rd bond

  uint8_t len =0;

  eeprom_status      = EEPROM.read(bond_index * BYTES_PER_BOND_IN_HEADER);
  if (0x00 == eeprom_status)
  {
    return (aci_status_code_t)BOND_DOES_NOT_EXIST_AT_INDEX;
  }

                  //Reset the number of bonds and count from the EEPROM header
                  bond_number = 0;
                  eeprom_status = EEPROM.read(0);
                  if (eeprom_status != 0xFF)
                  {
                    bond_number++;
                    //Update the write offset to the correct number
                    eeprom_write_offset = EEPROM.read(bond_number * BYTES_PER_BOND_IN_HEADER + 1);
                    if (EEPROM.read(2) != 0xFF)
                    {
                      bond_number++;
                      //This is needed only if we wanted to add a 3rd bond
