Fixing crash when excluding a file.