fixed bug with collection not iterating through files