Fixed bug for reduction in local memory which was always op_add