Fix error in findDirectoryEntry