Fixing reducer output type problem