Minor fixes to twi files