Fix resource destructors Apparently the resource name is quite important. The old code was attempting to free all hashes with the iterator destructor which also had a bug that masked the underlying issue. This fixes the wrong destructor issue as well as the iterator destructor bug.