Fix Shutdown Hook.