Fix map reduce