Fixed bug when trying to loop over unam data files