fixes issue with iteration