fix iteration bug in hydration