fix problems with node / link deletion