fixed bug in hash merge