Fix bug failing to merge when selecting the right side