stop ObjectDisposed errors on windows