Merge "Fix loop iteration bug."
am: 1a74681173

Change-Id: I0f01f27d328b242cf8c102bbfe70324d9d263ce9