Fix save bug on windows