fixes to allreduce