More fixes to LDI writer..