added finalization of hash tables on shutdown