Fix a bug in file listing