unload_namespace added where it's necessary