Minor fixes in twi.c