Revert "Clear object registries on shutdown."

This reverts commit 59640888afe0fee60b89445235c8550b13a62ccc.
Revert "Revert "Clear object registries on shutdown.""

This reverts commit 0a9c2989e58ecf0580ce0a70a6069052a06a19c3.
quick fix for KeyError on shutdown