MapReduce fixes