Fixed iteration issue