Fix "too many files" bug