fixed files callback returning an empty array if no files