Added missing return in reduce.