Fixing problems with the dispose pattern.

Thx nexidia dood.