NIW dbg: bug fixes
WIP: NIW dbg: various bug fixes