Fix issues with IDisposable

Two classes weren't adhering to the basic `IDisposable` pattern.