fixing bugs in reductions