potential fix for issue 218 (circular references preventing garbage collection)