DLL loading/unloading behaviour fixed