Fix reduce problems.

The point to resolve the promise got determined incorrectly.