fixed EEPROM
fixed a minor memory leak