fix detecting a merge is needed.