Correct a bug in the filenames processing.