Fixes for MapReduce function used without buffer