fix format_filenames()