fix bug in windows that makes qgis crash.