Fixed errors in reducer and combiner to pass test cases.