fix hash iteration issue