remove references to deleted namespaces