Reduce phase was only working on the last set of data