More fixes to transform_reduce