Fix CPU leak in Windows