solution for duplicate label
disconnect graph