fix compare strategy for ref resolution in compare
add merge method for compare (do not remove)