Fix deletion of old nodes