I2C bugfix

Fixed a bug where I2C would hang in Realease distribution due to
compiler optimization