Backport changes in DLL to STATIC