diff --git a/config.h.cmake b/config.h.cmake
index 42b12731ec0721cc6a5062db56d34648c627593d..ab8b6b0b07efe03c6a5a9451f2871427b5d91f05 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -50,6 +50,5 @@
 #cmakedefine HAVE_ADVANCED_IM
 #cmakedefine HAVE_DB_STORAGE
 #cmakedefine ENABLE_UPDATE_CHECK 1
-#cmakedefine ENABLE_MICROSOFT_STORE_APP
 #cmakedefine HAVE_GETIFADDRS
 
diff --git a/wrappers/csharp/wrapper_impl.mustache b/wrappers/csharp/wrapper_impl.mustache
index c2eec0171075a693b513eccbb9cf2e86f8e10add..238c2381bbe2ccfdc96cf598d6b4fe48cd0ab80d 100644
--- a/wrappers/csharp/wrapper_impl.mustache
+++ b/wrappers/csharp/wrapper_impl.mustache
@@ -35,6 +35,8 @@ namespace Linphone
 		public const string VERSION = "{{version}}";
 #if __IOS__
 		public const string LIB_NAME = "linphone.framework/linphone";
+#elif WINDOWS_UWP
+		public const string LIB_NAME = "liblinphone"; // With this, it automatically finds liblinphone.dll
 #else
 		public const string LIB_NAME = "linphone"; // With this, it automatically finds liblinphone.so
 #endif
@@ -448,9 +450,11 @@ namespace Linphone
 			}
 			set
 			{
+				IntPtr string_ptr_to_remove = linphone_call_get_native_video_window_id(nativePtr);
 				IntPtr string_ptr = Marshal.StringToHGlobalUni(value);
 				linphone_call_set_native_video_window_id(nativePtr, string_ptr);
-				Marshal.FreeHGlobal(string_ptr);
+				if(string_ptr_to_remove != IntPtr.Zero)
+					Marshal.FreeHGlobal(string_ptr_to_remove);
 			}
 		}
 		{{/isLinphoneCall}}
@@ -477,9 +481,11 @@ namespace Linphone
 			}
 			set
 			{
+				IntPtr string_ptr_to_remove = linphone_core_get_native_video_window_id(nativePtr);
+				if(string_ptr_to_remove != IntPtr.Zero)
+					Marshal.FreeHGlobal(string_ptr_to_remove);
 				IntPtr string_ptr = Marshal.StringToHGlobalUni(value);
 				linphone_core_set_native_video_window_id(nativePtr, string_ptr);
-				Marshal.FreeHGlobal(string_ptr);
 			}
 		}
 
@@ -492,9 +498,11 @@ namespace Linphone
 			}
 			set
 			{
+				IntPtr string_ptr_to_remove = linphone_core_get_native_preview_window_id(nativePtr);
+				if(string_ptr_to_remove != IntPtr.Zero)
+					Marshal.FreeHGlobal(string_ptr_to_remove);
 				IntPtr string_ptr = Marshal.StringToHGlobalUni(value);
 				linphone_core_set_native_preview_window_id(nativePtr, string_ptr);
-				Marshal.FreeHGlobal(string_ptr);
 			}
 		}
 		{{/isLinphoneCore}}