Fix edge merging when removing