Doesn't this close get called twice on windows?