fixed indexing error if parent directory was added to index