fixed removeId statement erasing the edges