a small fix of mapreduce function signature