It's not the I2C sensors i have tried several. If i scan them as sensor 2 then the code is stored correctly, if i scan them as sensor one the first byte is corrupted when stored I tried moving the eeprom to store starting at a different location other than address 0 this still returns a corrupt first byte but works otherwise. very odd.