Correctly implement IDisposable, fixes #15