Fixed error when adding a list of files.