fix I2C bugs