Fixed bug in li2c_writeread.