trying to fix some bugs in merge algo