Fix for when files are supplied via an object instead of an array.