Fix bug when populating file list