Iterating through a smaller collection to avoid exception