Fixes a bug with files with non-standard names.