removing nodes and their edges if clicked (dirty hack)