should fix a bug when indexing a directory with a lot of entries