Fixed a bug when getting filelist