map reduce and join fixes