applied latest NATT patch with some fixes and cleanups