fix map/reduce