Fixed the parentNode bug - seems like deleting the graphs doesn't work all that well