Fixed bug with write eeprom
Big bug on write_flash