Fixes for MapReduce function used without buffer
integrating valmars work
Merge branch 'valmar-master' into irecvfix