Fixed crashing windows build