Fixed the delete directory and NamespaceMap