Added changes for new IDisposable contract