fixed folding bug on windows