Fixing generalized reduce