fixed bugs in filename_clean_copy in common