few fixes in the merge code