Fixed a crash while executing the generator on Windows