added some slight changes to unregistering nodes