Fix for ObjectDisposed exception if form was closed.