Fix runtimeerror in windows