Fixed a cleanup glitch on Windows