Fixed reset for Windows; leaks memory, though...