fix a delay bug in reduce