R: fix labels of curved edges, partially fix #181