fix bug related to get_filename()