handling hash merge better