Fixed the name inference for deleted directories