Deal with 0-degree nodes